Python Important Questions
Python Important Questions
Module-1
1. Demonstrate with example print(), input() and
string replication.
2. Develop a program to generate Fibonacci
square of length (N). Read N from the
console.
3. Explain elif, for, while, break and continue
statements in python with examples for each.
4. What are user defined functions? How can we
pass parameters in user defined functions?
Explain with suitable example.
5. Explain Local and Global scope with variables
for each.
6. Develop a program to read the name and year
of birth of a person. Print whether the person
is a senior citizen or not.
7. Demonstrate with example print(), input() and
format().
8. Write a python program to check whether a
given number is Armstrong or not.
9. Write a python program to guess the secret
number between 1 to 25 when 5 guess if the
number is same then it is right guess else
wrong guess.
10.What are comparison and Boolean
operators? List all the comparison and
Boolean operators in Python.
11.Exception Handling in Python with
example.
12. How to import the Module and sys.exit().
13. Explain the len(), type() functions.
Module-2
1. Explain the methods of list, tuples and
dictionaries with examples.
2. Keys(), values() and items() in the
dictionaries.
3. Explain the concept of list slicing and list
traversing with an example.
4. Explain the How tuple different from list
and which function is used to convert list to
tuple.
5. List the metrics of dictionary over list.
6. Read N numbers from the console and
create a list. Develop a program to compute
and print mean, variance and standard
deviation with messages.
Module-3
Module-4
1. What is meant by compressing Files? Explain
reading, extracting and creating ZIP files with
examples.
2. Define assertions . What does an assert
statement in python consist of?
3. Explain the OS Module and its Methods?
4. How does OS.walk() work in python?
5. Discuss the basicConfig() method to configure
the lagging with an example.
6. Write a program to depict Raising Example.
7. Explain the functions of shutil module with an
example.
8. Lab program 7 backup file
Module-5
1. Explain the polymorphism with example.
2. Explain __init__ and __str__, __repr__ method
with an example
3.Explain Printing Objects.
3. Demonstrate pure function with example.
4.Explain the different Access Modifiers in Python
with example.
5.Explain operator overloading and polymorphism
with example.
6.Explain inheritance in python.
7.How class can be instantiated in python? Write
a python program to instances as return values to
define a class Rectangle with member width.
Height cornerX cornerY and member function to
find center area and perimeter of a rectangle.