23UPYPE15 Python Programming Lab Syllabus:

23UPYPE15 Python Programming Lab Syllabus – Annamalai University UG Syllabus Regulation 2023-24

Objectives of the Course

  • Acquire programming skills in core Python.
  • Acquire Object-oriented programming skills in Python.
  • Develop the skill of designing graphical-user interfaces (GUI) in Python.
  • Develop the ability to write database applications in Python.
  • Acquire Python programming skills to move into specific branches

List of Exercises:

1. Program to convert the given temperature from Fahrenheit to Celsius and vice versa depending upon user’s choice.

2. Program to calculate total marks, percentage and grade of a student. Marks obtained in each of the five subjects are to be input by user. Assign grades according to the following criteria:

  • Grade A: Percentage >=80
  • Grade B: Percentage >=70 and 80
  • Grade C: Percentage >=60 and <70
  • Grade D: Percentage >=40 and <60
  • Grade E: Percentage < 40

3. Create a menu driven Python program to find the area of rectangle, square, circle and triangle by accepting suitable input parameters from user.

4. Write a Python script that prints prime numbers in between given two numbers.

5. Program to find factorial of the given number using recursive function.

6. Write a Python script to generate the Fibonacci series

7. Write a Python program to count the number of even and odd numbers from array of N numbers.

8. Write a Python class to reverse a string word by word.

9. Given a tuple and a list as input, write a program to count the occurrences of all items of the list in the tuple. (Input : tuple = (‘a’, ‘a’, ‘c’, ‘b’, ‘d’), list = [‘a’, ‘b’], Output : 3)

10. Create a Savings Account class that behaves just like a BankAccount, but also has an interest rate and a method that increases the balance by the appropriate amount of interest (Hint:use Inheritance).

11. Write a Python program to construct the following pattern, using a nested loop

*

**

***

****

*****

****

***

**

*

12. Write a Python program to carry out Matrix Multiplication

13. Write a Python script to generate the Pascal Triangle

14. Read a file content and copy only the contents at odd lines into a new file.

15. Create a Turtle graphics window with specific size.

Recommended Text Book

  • E Balagurusamy, “Introduction to Computing and Problem Solving Using Python”,1st Edition, McGraw Hill India; 2016
  • Charles Dierbach, “Introduction to Computer Science using Python – A computational Problem     solving Focus”, Wiley India Edition, 2015.
  • Wesley J. Chun, “Core Python Applications Programming”, 3rd Edition , Pearson Education, 2016

Reference Books

  • Mark Lutz, “Learning Python Powerful Object Oriented Programming”, O’reilly Media 2018, 5th Edition.
  • Timothy A. Budd, “Exploring Python”, Tata MCGraw Hill Education Private Limited 2011, 1 st Edition.
  • John Zelle, “Python Programming: An Introduction to Computer Science”, Second edition, Course Technology Cengage Learning Publications, 2013, ISBN 978- 1590282410
  • Michel Dawson, “Python Programming for Absolute Beginers” , Third Edition, Course Technology     Cengage Learning Publications, 2013, ISBN 978-1435455009