0% found this document useful (0 votes)
15 views

Unit 1: (If, If-Else, If-Elif-Else)

Uploaded by

panave3104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Unit 1: (If, If-Else, If-Elif-Else)

Uploaded by

panave3104
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

UNIT 1

1. Explain local and global variables with example.


2. What is type conversion/type casting? Explain types of type conversion with program
example.
3. Explain selection control statements in python with syntax, flowchart and example. (if, if-else,
if-elif-else)
4. Develop a python program to implement list operations and methods.
5. Write a python program to implement list operations (concatenation, membership, iteration,
indexing and slicing).
6. Write a python program to implement list methods (append, add, extend and delete).
7. Explain any 8 methods used in python dictionary with example.
8. Develop a python program to implement dictionary operations and methods.
9. Define sets? Explain the various set operations used in python.
10. Explain with suitable example iterables and iterators in python.
11. What is generators? Develop a python program to find factorial of a number using generators.
12. Develop a python program to print Fibonacci sequence using generators.
13. Define comprehensions. Explain list comprehension and dictionary comprehension with
syntax and example.
14. Explain types of loops in python with syntax, flowchart and example. (while, for, nested loop)
15. Explain break and continue in python with suitable program example.
16. Explain types of errors in python with example. Demonstrate how to handle exceptions with
program example.
17. Define exception. Write a python program to find reciprocal of numbers, string and explain
how to handle the exception.
18. Define debugging. Explain how to debug the program using pdb module and breakpoint()
with program example.

UNIT 2
1. What are different types of inheritance? Explain with suitable example.
2. Explain polymorphism with program example.
3. Explain data abstraction with program example.
4. Define the terms: i) class ii) object iii) abstraction iv) encapsulation v) inheritance
vi) polymorphism.
5. Develop a program to demonstrate data encapsulation in python.
6. Explain object and class with syntax and example.
7. Develop a python program to demonstrate creating a method in python.
8. Explain method overriding with suitable program example.
9. Develop a python program to demonstrate creating a class and objects in python.
10. What is inheritance? Demonstrate how to inherit from another class in python.
11. What is virtual functions? Explain virtual functions with example.
12. Explain the different ways of importing math module in python.
13. Define modules. Develop a python program to implement rock, paper and scissors game by
importing a random module.
14. Define Package. Write a python program to create a package(college), sub package(all dept),
modules (departments) and create an admin and cabin function to the module.
15. Explain class attribute and class decorators with suitable example.
16. Explain attributes and types of methods in OOP.

You might also like