Course Details
Subject {L-T-P / C} : PH2076 : Computer Programming Laboratory { 0-0-3 / 2}
Subject Nature : Practical
Syllabus
| Module 1 : |
Setting up Python environment and learn how to use it. Handling strings, input() and print() statements. Variables, assignment, and string concatenation. Introduction to List methods, List slicing, and IF/ELSE constructs. |
| Module 2 : |
Introduction to FOR loop. FOR loop with IF/ELSE statement. Handling integer, floats, and introduction to arithmetic operations. Introduction to the Python module RANDOM, finding the probability distribution of the outcomes of throwing two or more dice. |
| Module 3 : |
The WHILE loop and the logical operators AND, OR, NOT, NOT IN. Introduction to the data type Boolean. Lists and arithmetic operations, nested FOR loops, list FLATTENING. |
| Module 4 : |
Introduction to the data type DICTIONARY and list of dictionaries. Application of dictionaries. User defined FUNCTION and DATABASE creation. |
| Module 5 : |
Working with files: reading from a file, working with a file’s contents, writing to a file , storing data. Creating and using a CLASS. |
Course Objective
| 1 . |
To familiarize students with the Python programming, including variables, strings, lists, and control flow structures. |
| 2 . |
To develop problem-solving skills using loops (FOR and WHILE) and logical operators. |
| 3 . |
To introduce fundamental data structures like lists and dictionaries, and their practical applications in data handling and storage. |
| 4 . |
To provide hands-on experience with object-oriented programming concepts, file handling, and database creation in Python. |
Course Outcome
| 1 . |
At the end of the course, students will be able to:Set up a Python environment and effectively use basic programming constructs. |
| 2 . |
Demonstrate proficiency in using loops (FOR, WHILE) and conditional statements.
|
| 3 . |
Implement Python's built-in data structures and apply them in real-world scenarios. |
| 4 . |
Gain the ability to design user-defined functions, create and use classes, and manage file operations. |
| 5 . |
Create a class, reading and writing a file, and storing data. |
Essential Reading
| 1 . |
S. Bonaretti, Learn Python with Jupyter, www.learnpythonwithjupyter.com. |
| 2 . |
E. Matthes,, Python Crash Course, no starch press (2023). |
| 3 . |
A. Sweigart, Automate the Boring Stuff with Python, no starch press (2024). |
Supplementary Reading
| 1 . |
Z. A. Shaw, Learn Python the Hard Way, Pearson Education (2024). |
| 2 . |
A. B. Downey, Think Python, O’Reilly (2024) |
Journal and Conferences
| 1 . |
|



