Professional Documents
Culture Documents
d) Write a program to create class EMPLOYEE with ID and NAME and display its contents.
d) Write a Python program to find the factorial of a number provided by the user.
3. Attempt any THREE of the following: 12M
a) List data types used in Python. Explain any two with example
a) Write a python program to input any two tuples and interchange the tuple variables.
c) With neat example differentiate between readline () and readlines ( ) functions in file-
handling.
d) Write a program for importing module for addition and subtraction of two numbers
a) Write a program to create dictionary of student the includes their ROLL NO and NAME
i) Add three students in above dictionary
ii) Update name=’Shreyas’ of ROLL NO=2
iii) Delete information of ROLL NO=1
b) What is command line argument? Write python code to add b) two numbers given as input
from command line arguments and print its sum.
d) Write python program to read contents of abc.txt and write same content to pqr.txt.
b) Write a Python program to calculate sum of digit of given number using function.
c) Write a program to open a file in write mode and append some content at the end of file
c) Write a Python Program to accept values from user in a list and find the largest number and
smallest number in a list.
6. Attempt any TWO of the following: 12 M
b) Design a class student with data members; Name, roll number address. Create suitable
method for reading and printing students details.
b) Design a class student with data members : name, roll no., department, mobile no. Create
suitable methods for reading and printing student information.
c) Create a parent class named Animals and a child class Herbivorous which will extend the class
Animal. In the child class Herbivorous over side the method feed ( ). Create a object