This is the syllabus and solutions for Python Programming Laboratory course prescribed for 3rd Semester Undergraduate Computer Science and Engineering Programme starting from the year 2019 at Dr.Ambedkar Institute of Technology (Dr.AIT), Bengaluru, Karnataka, India.

Sub Title: Python Programming Laboratory
Sub Code: 18CSL38
Exam Duration: 3 Hours
No. of Credits: 1 = 0: 0: 1 (L: T: P)
No. of Lecture Hours/Week: 2

Course objectives:

  1. Interpret the use of procedural statements like assignments, conditional statements, loops and function calls.
  2. Infer the supported data structures like lists, dictionaries and tuples in Python.
  3. Illustrate the application of matrices and regular expressions in building the Python programs.
  4. Discover the use of external modules in creating excel files and navigating the file systems.
  5. Describe the need for Object-oriented programming concepts in Python.

Sl. No Programs
1. Write a Python program to print all Disarium numbers between 1 and 100.

2. Write a Python program to encrypt the text using Caesar Cipher technique. Display the encrypted text. Prompt the user for input and the shift pattern.

3. Write a Python program to simulate ATM transactions by including the following operations:
a) Check for correctness of the ATM pin.
b) Perform Balance, Withdraw and Deposit Operations.
The above operations should be menu-driven and display appropriate messages after performing each of these operations.

4. The celebrity problem is the problem of finding the celebrity among n people. A celebrity is someone who does not know anyone (including themselves) but is known by everyone. Write a Python program to solve the celebrity problem.

5. Write a Python program to construct a linked list. Prompt the user for input. Remove any duplicate numbers from the linked list.

6. Perform the following file operations using Python
a) Traverse a path and display all the files and subdirectories in each level till the deepest level for a given path. Also, display the total number of files and subdirectories.
b) Read a file content and copy only the contents at odd lines into a new file.


Sl. No Programs
1. Devise a Python program to implement the Rock-Paper-Scissor game.

2. Create a menu drive Python program with a dictionary for words and their meanings. Write functions to add a new entry (word: meaning), search for a particular word
and retrieve meaning, given meaning find words with the same meaning, remove an entry, display all words sorted alphabetically.

3. Write a Python program to perform Jump Search for a given key and report success or failure. Prompt the user to enter the key and a list of numbers.

4. Using Regular Expressions, develop a Python program to
a) Identify a word with a sequence of one upper case letter followed by lower case letters.
b) Find all the patterns of “1(0+)1” in a given string.
c) Match a word containing ‘z’ followed by one or more o’s.

5. Write a Python program to plot the Line chart in MS Excel Sheet using XlsxWriter module to display the annual net income of the companies mentioned below.

MS Excel Data

6. Devise a Python program to implement the Hangman Game.


Course Outcomes

COs Statements Bloom’s Level
CO1 Describe the Python language syntax including control statements, loops and functions to write programs for a wide variety problem in mathematics, science, and games. L2
CO2 Examine the core data structures like lists, dictionaries, tuples and sets in Python to store, process and sort the data. L3
CO3 Interpret the concepts of Object-oriented programming as used in Python using encapsulation, polymorphism and inheritance. L3
CO4 Discover the capabilities of Python regular expression for data verification and utilize matrices for building performance efficient Python programs. L2
CO5 Identify the external modules for creating and writing data to excel files and inspect the file operations to navigate the file systems. L2

Course Articulation Matrix (CO-PO Mapping)

CO1 3 3 2 2 3 - - - - - - - 1 3 -
CO2 3 2 2 3 3 - - - - - - - 2 3 -
CO3 3 3 3 2 3 - - - - - - - 2 3 -
CO4 2 1 2 2 3 - - - - - - - 1 2 -
CO5 2 1 2 1 3 - - - - - - - 1 1 -


comments powered by Disqus