0% found this document useful (0 votes)
8 views19 pages

Final Lab Manual of CP 24CE (For Print)

The document is a lab manual for a Computer Programming course in the Department of Civil Engineering, detailing various lab activities focused on Python programming. It covers topics such as basic input/output, control structures, functions, object-oriented programming, and data visualization, with expected outcomes for each lab. The manual also includes sections for instructor signatures and images captured during lab activities.

Uploaded by

Faisal Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views19 pages

Final Lab Manual of CP 24CE (For Print)

The document is a lab manual for a Computer Programming course in the Department of Civil Engineering, detailing various lab activities focused on Python programming. It covers topics such as basic input/output, control structures, functions, object-oriented programming, and data visualization, with expected outcomes for each lab. The manual also includes sections for instructor signatures and images captured during lab activities.

Uploaded by

Faisal Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Department of Civil

Engineering

Lab Manual
Computer Programming

Name: Roll No.


Introduction to Python Programming /
(Language of preferred choice).
1
Basic Input /Output and String Operations.
2
3 Boolean Logic and Logical Operators.
Working with Dates and Time in Python
4 (Language of preferred choice)
Control Structures – Conditional Statements
5
Understanding the loops in programming
6 language.
Functions and Modular Programming.
7
Working with lists, indexing, and slicing.
8
9 Working with Numerical Operations and
Mathematical Libraries.
File Handling in Python (Language of choice).
10
Introduction to Object-Oriented Programming.
11 (OOP).
Working with Dictionaries and Tuples.
12
Data Visualization using Matplotlib.
13
Introduction to Computational Problem Solving.
14
15 Error Handling and Debugging in programming
languagues.

16 Open Ended Lab.


It is to certify that having Roll
No. has successfully carried out all necessary practical activities of CP lab as
prescribed by the University for the year of .

Signature of Instructor:
Submission Date:
Lab Manual: Computer Programming

Lab No. 1: Introduction to Python Programming / (Language of preferred choice)

Lab Activities:

• Install Python and set up the development environment.


• Write and execute a simple Python program (e.g., print "Hello, World!").
• Understand the basic syntax and structure of Python.

Introduction to Computer Programming Lab:

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to install Python and run basic programs.


• Understand the importance of indentation in Python.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 2: Basic Input/Output and String Operations.

Lab Activities:

• Read user input using input().


• Perform basic string operations such as concatenation, slicing, and formatting.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to take user input and process string operations.
• Understand string indexing and slicing.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 3: Boolean Logic and Logical Operators.

Lab Activities:

• Work with Boolean values (True, False).


• Apply logical operators (and, or, not) in decision-making.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to apply Boolean logic in conditional statements.


• Understand the precedence of logical operators.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 4: Working with Dates and Time in Python (Language of preferred choice).

Lab Activities:

• Use the datetime module to work with date and time.


• Format and manipulate date and time values.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to fetch, format, and manipulate date/time in Python.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 5: Control Structures – Conditional Statements.

Lab Activities:

• Implement if, elif, and else statements for decision-making.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will understand conditional flow control in Python.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 6: Understanding the loops in programming language.

Lab Activities:

• Implement for and while loops.


• Use loop control statements (break, continue, pass).

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to execute iterative operations using loops.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 7: Functions and Modular Programming.

Lab Activities:

• Define and call functions.


• Work with parameters and return values.
• Implement modular programming using modules.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to write reusable code using functions.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 8: Working with lists, indexing, and slicing.

Lab Activities:

• Create and manipulate lists.


• Use indexing and slicing techniques.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to store and manipulate collections of data.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 9: Working with Numerical Operations and Mathematical Libraries.

Lab Activities:

• Perform arithmetic operations.


• Use the math and random libraries.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will understand numerical operations and mathematical functions. Use the math and
random libraries.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 10: File Handling in Python (Language of choice).

Lab Activities:

• Read and write files using open (), read (), and write ().
• Implement file handling operations (text and binary files).

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to handle file input and output operations.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 11: Introduction to Object-Oriented Programming. (OOP).

Lab Activities:

• Create and use classes and objects.


• Implement basic OOP principles (Encapsulation, Inheritance).

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will understand the concept of OOP in Python.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 12: Working with Dictionaries and Tuples.

Lab Activities:

• Create, access, and manipulate dictionaries and tuples.


• Perform operations like adding, updating, and deleting elements.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will understand dictionary and tuple operations.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 13: Data Visualization using Matplotlib.

Lab Activities:

• Install and use Matplotlib.


• Create different types of plots (line plot, bar chart, scatter plot).

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to visualize data using charts.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 14: Introduction to Computational Problem Solving.

Lab Activities:

• Solve real-world problems using algorithms.


• Implement solutions using Python.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will develop problem-solving skills using programming techniques.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 15: Error Handling and Debugging in programming languagues.

Lab Activities:

• Handle exceptions using try, except, finally.


• Debug programs using print statements and debuggers.

Paste the Images Captured in the Lab:

Expected Outcomes:

• Students will be able to write error-free, robust programs.

Signature of Instructor:
Lab Manual: Computer Programming

Lab No. 16: To perform an open-ended lab.

Signature of Instructor:

You might also like