DMI COLLEGE OFENGINEERING
(AN AUTONOMOUS INSTITUTION)
PRACTICAL EXAMINATION 2024-2025(EVEN)
EM1152- PROGRAMMING IN PRACTICE LABORATORY
QUESTION SET 2
Aim&Algorithm Program Output & Viva- Record Total
Results Voce
20 30 30 10 10 100
1.a.Write Python programs for swapping two numbers, conversion of one data type into
another.
b. Develop a Class in Python to demonstrate the concept of constructors, destructor, data
hiding, super() method, class() method, and static and instance methods.
.
2. Write a Python program to estimate the frequency of occurrence of characters in a String.
3.Write programs to generate Fibonacci series; prime numbers; perfect numbers; cyclic prime
numbers.
4. Write a Python program to manipulate matrices.
5.Write a program to estimate the age of an employee till today’s date in terms of years,
months, and days. Valid assumptions shall be applied.
6. Write a Python program to sort the dictionary using key or value.
7. Develop menu driven applications using user-defined functions in Python.
8. Write a function to demonstrate the ways of using arguments (arbitrary arguments,
keyword
arguments, Docstring, passing list as argument.
9. Write recursive functions to do the following:
a. To find the number of characters in a String
b.To find N factorial
10. Write Python programs to demonstrate Decorators and Iterators
11. Write Python code with the use of underscores in different ways to gain the knowledge
about their importance in application development
12. Write a Python program to read the contents of a file line by line and print the same on to
the display.
13. Write a Python application to select records either in ascending order or descending order
using MySQL Order By clause and using Python MySQL Connector and print them in the
required order.
14. Do experiment on setting up of Flask development environment.
15. Install MySQL and experiment with SQL commands