Python Programming
Course Code 1BEEL307C
Scheme 2025
Type of Course Ability Enhancement Course Lab
Semester III
Teaching Hours/Week (L :T : P) 0:0:2
CIE Marks 50
Total Hours of Pedagogy L :T:P:(SL:TW) 0:0:28:2
SEE Marks 50
Credits 1
Total Marks 100
Type of Examination Practical
Exam Hours 2
List of experiments
(1) Develop a Python program to simulate Rock-Paper-Scissor Game. The game shall produce output as illustrated with the inputs.
Optimize the code to contain only 1 if-else statement.
(Concept Explored: Conditional Statements)
(2) Write a python program to check whether a given number is prime or not.
(Concepts Explored: Looping and Conditional Statements)
(3) Write a Python program to calculate the length of a string without using built in function and determine whether it is a palindrome or not.
(Concepts Explored: Strings, Slicing)
(4) Develop a Python program to accept the scores of students in a department and determine the highest score obtained. The program shall identify the topper score, taking into account the possibility of multiple toppers, and calculate the sum of all scores present in the list.
(Concepts Explored: Python List)
(5) Write a Python function that accepts a sentence from the user and counts the number of words in the sentence.
(Concepts Explored: String splitting and List)
(6) Write a Python program to store the phone numbers of persons in a dictionary and display the phone number corresponding to a requested person's name.
(Concepts Explored: Dictionary)
(7) Develop a python program to count occurrence of all character’s present in each string.
(Concepts Explored: Dictionary get () method)
(8) Develop a python program to copy the contents of only odd-numbered lines from one file to another file.
(Concepts Explored: File Handling)
(9) Design a Python program using Regular expressions to:
(a)Extract Email IDs from a given text.
(b)Validate a user password having, minimum length of 6 characters, and maximum length of 16. The password must have at least one lower-case letter, at least one upper-case letter, at least one numeral (digit) and at least one special symbol (#, @, $, _).
(Concepts Explored: Regular Expression)
(10) Write a Python program to accept a list of integers from the user and separate them into even and odd numbers. Display the count and sum of even numbers and odd numbers separately.
(Concepts Explored: Lists, Looping, and Conditional Statements)
Reference books
(i) Computing with Python-An introduction to Python for Science and Engineering, Claus Fuherer, et al., Pearson.
(ii) Introduction to Python Programming, Udayan Das, et, el., Openstax.
(iii) Python Programming: Using Problem Solving Approach, Reema Thareja, Oxford University Press, New Delhi.
(iv) Intro to Python, Paul Deitel, Harvey Deitel, Pearson.

.png)