Pre - 0 24 - 25 Lab Manual Updated
Pre - 0 24 - 25 Lab Manual Updated
LAB MANUAL
Python Programming Lab (N-SECCS401P)
Year: 2nd
Semester: IV
Name of Student:
Roll No.:
Semester/Year:
Academic Session:
Date of Performance:
Date of Submission:
Hardware Requirement
● Processor : Dual Core
● RAM : 1GB
● Hard Disk Drive : > 80 GB
Software Requirement
● Operating System – Windows 2007 and Ubuntu
● Package used – Python3, Numpy, Pandas, Django
● IDE – Visual Studio, Pycharm
● Editors – Text editor, sublime text
● Online platform – Jupyter, Google co-lab
Institute Vision:
Emerge as a leading Institute for developing competent and creative Professionals
Institute Mission:
1. Providing Quality Infrastructure and experienced faculty for academic excellence
2. Inculcating skills, knowledge and opportunities for competency and creativity
3. Aligning with Industries for knowledge sharing, research and development
Department Vision:
To become a center for quality education in the field of computer science & engineering and to
create competent professionals.
Department Mission:
● To provide academic ambience and latest software tools to prepare competent Software
Engineers with strong theoretical and practical knowledge.
● To foster professionalism and strong work ethics in students for the betterment of Society.
● To provide adequate infrastructure as well as experienced & skilled faculty members.
● To encourage the spirit of entrepreneurship and adaptability in our students in view of the ever-
changing scenario of the Software Industry.
Course Outcomes:
On successful completion of this course, students will be able to
1. Apply: Apply knowledge of Python Scripting, control structure, string and functions to
solve the given problems effectively.
2. Apply: Utilize concepts of NumPy, data structure, files and data frames to develop
efficient solution for the given problems.
3. Analysis: Analyze the problems using knowledge of object-oriented programming and
Exception handling to develop useful applications.
4. Evaluate: Select appropriate libraries and modules available in python programming to
solve the given problem efficiently.
5. Create: Design and Develop solutions using Python libraries and Web framework for
the given problem statement.
DO’S
● Students should enter into the laboratory on time and should take permission before
entering laboratory.
● Students should come in proper uniforms.
● Students should come with Observation book and Lab manual in the laboratory.
● Students should maintain silence inside the laboratory.
● After completing the laboratory exercise, make sure to shut down the system and arrange
chairs properly.
DONT’S
● Students bringing the bags inside the laboratory.
● Students using mobile phones inside the laboratory.
● Students using the computers in an improper way.
● Students scribbling on the desk and mishandling the chairs.
● Students making noise inside the laboratory.
List of Practicals
Develop a Python program to plot a line graph using Matplotlib. The graph should
9. display the relationship between two variables: CO4
X- axis: Number of study hours (e.g., [1, 2, 3, 4, 5]). CO5
Y-axis: Marks obtained in a test out of 100 (e.g., [20, 40, 60, 80, 100]).
1. Add a title to your graph (e.g., "Study Hours vs Marks").
2. Label the X-axis as "Hours Studied" and the Y-axis as "Marks".
3. Use a different line style, color, and marker to customize your plot.
4. Add a legend to describe the line (e.g., "Marks Trend").
Practical No. 0
Aim: PRE-LAB: Develop an application to print sum of two numbers
entered from the keyboard in various python IDEs, editors and online
platforms.
Name of Student:
Roll No.:
Semester/Year:
Academic Session:
Date of Performance:
Date of Submission:
AIM: PRE-LAB: Develop an application to print sum of two numbers entered from the keyboard
in various python IDEs, editors and online platforms.
Software Requirement
● Operating System – Windows 2007 and Ubuntu
● Package used – Python3, Numpy, Pandas, Django
● IDE – Visual Studio, Pycharm
● Editors – Text editor, sublime text
● Online platform – Jupyter, Google co-lab
THEORY:
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming
language. It was created by “Guido van Rossum” during 1985- 1990. Python source code is also
available under the GNU General Public License (GPL). Python is designed to be highly readable.
It uses English keywords frequently whereas other languages use punctuation, and it has fewer
syntactic constructions than other languages.
Why python?
Python is Interpreted − Python is processed at runtime by the interpreter. You do not need
to compile your program before executing it. This is similar to PERL and PHP.
Python is Interactive − You can actually sit at a Python prompt and interact with the
interpreter directly to write your programs.
Python is Object-Oriented − Python supports Object-Oriented style or technique of
programming that encapsulates code within objects.
programming tasks, from text pattern matching to network scripting. In addition, Python can be
extended with both homegrown libraries and a vast collection of third-party application support
software.
Component integration − Python scripts can easily communicate with other parts of an
application, using a variety of integration mechanisms. Such integrations allow Python to be used
as a product customization and extension tool.
Enjoyment − Because of Python’s ease of use and built-in toolset, it can make the act of
programming more pleasure than chore. Although this may be an intangible benefit, its effect on
productivity is an important asset.
Installing python:
● Open a Web browser and go to https://www.python.org/downloads/.
● Follow the link for the Windows installer python-XYZ.msi file where XYZ is the version
you need to install.
● To use this installer python-XYZ.msi, the Windows system must support Microsoft Installer
2.0. Save the installer file to your local machine and then run it to find out if your machine
supports MSI.
● Run the downloaded file. This brings up the Python install wizard, which is really easy to
use. Just accept the default settings, wait until the install is finished, and you are done.
IDLE, PyCharm, Spyder, Jupyter, VS Code, PyDev, Eclipse, Netbeans, Cloud9, PyScriptor,
Sublime Text3, Notepad++, Atom, Thonny, Wing, Eric, IntelliJ IDEA, Google Co-lab.
ALGORITHM:
FLOWCHART:
CODE:
CONCLUSION:
REFERENCE:
1. https://python-iitk.vlabs.ac.in/
2. “Learning Python”, Mark Lutz, Fourth Edition, O'Reilly Media, Inc.
3. https://colab.research.google.com/?utm_source=scs-index
4. https://www.youtube.com/watch?v=Y8Tko2YC5hA
SCREENSHOT: