SHRI RAM GROUP OF COLLEGES
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
[Link]- IVSEM.
SUBJECT: PYTHON
ASSIGNMENT-V
UNIT-V
DATE-
Q.1 Discuss sorting and merging. Explain different types of sorting with example. Write a Python
program for Sieve of Eratosthenes.
Q.2 Explain unpacking sequences, mutable sequences, and list comprehension with example.
Write a program to sort list of dictionaries by values in Python – Using lambda function.
Q.3 Discuss File I/O in Python. How to perform open, read, write, and close into a file ? Write a
Python program to read a file line-by-line store it into a variable.
Q.4 Explain iterator. Write a program to demonstrate the Tower of Hanoi using function.
Q.5 What do you mean by iterator?
b. Define recursion. Also, give example?
Q7. Discuss and differentiate iterators and recursion. Write a program for recursive Fibonacci
series.
*LAST DATE OF SUBMISSION-
TIME- 2:00 P:M
Himani
CSE