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.

Course Title: Python Programming Laboratory
Course Code: 18CSL37
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.

a) Write a Python program to print all the Disarium numbers between 1 and 100.

b) 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.

Solution

2.

Devise a Python program to implement the Rock-Paper-Scissor game.

Solution

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.

Solution

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.

Solution

5.

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

Solution

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.

Solution

7.

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.

Solution

8.

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.

Prompt the user for input.

Solution

9.

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

Solution

10.

Devise a Python program to implement the Hangman Game.

Solution



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)

COs
POs
PSOs
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
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

comments powered by Disqus