Unit 4
Long answer question of Python Programming
Q1 Discuss ADT in python. How to define ADT? Write code for a student information. . [ 2019-20]
Q2 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. . [ 2019-20]
Q3 Discuss Exceptions and Assertions in python. How to handle Exceptions with Try-Finally? Explain 5 Built-in Exceptions with example. [ 2019-20] [21-22]
Q4 Write a Python function average to compute the average of a list of numbers. The function must use try-except to handle the case where the input list is empty. Further, in that case the average for the empty list should be set to 0.0 using the except block. [2020-2021]
Q5 How can you create python file that can be imported as a library as well as run as a standalone script? [2020-2021]
Q6 Describe the difference between
Import library
And
From library import *
When used in python program . here library is some python library[2020-2021]
Q7 How can you randomize the items of a list in place in Python? [2021-22]
Q8 How to create and import a module in Python? [2021-22]
Q9 Explain the algorithm Programming Sieve of Eratosthene used in Python programming[2021-22]
Q10 Explain the use of __IT__ function in a class python?
You may Like to Read this
PYTHON PROGRAMMING ALL STUDY MATERIAL || 99+ MOST IMPORTANT QUESTION WITH SOLUTION