Python Programmin MR24 QB-1
Python Programmin MR24 QB-1
UNIT - 1
UNIT 2
UNIT 3
UNIT 4
1. A. Define Dictionary. Explain about creating dictionary and accessing
elements of dictionary in Python.
B. With example, explain about adding, removing and updating of
dictionary items in Python.
2. With example, explain the following dictionary methods:
A. keys () B. values ()
C. copy () D. fromkeys ()
3. With example, explain the following dictionary methods:
A. get () B. popitem ()
C. setdefault () D. update ()
4. A. Define a function. Explain creating and calling a function with
example in Python.
B. Write a Python program to find sum of n natural numbers using user-
defined functions.
5. Explain about default and keyword arguments in Python with example.
6. Explain about positional, variable length and variable keyword length
arguments in Python with example.
7. A. How a function is passed as argument to the other function. Explain
with example.
B. Write short note on return keyword and give example.
8. Define recursion and write a Python program to find factorial of
a given number using recursion.
9. Write a Python program to display Fibonacci series up to given
range using functions:
A) Without using recursion B) Using Recursion
10.With an example explain lamda with filter (), map () and
reduce() functions.
UNIT 5
1. A. Explain about creating class, object and accessing of class
members with example.
2. Explain about method and __init__ () method with example.
3. What is inheritance? Explain different types if inheritance with
example.
4. Explain about abstraction and encapsulation with an example.
5. What is error? Explain different types of errors occurred in
programming.
6. With example, explain exception handling in Python.
7. Write a Python program illustrating:
A. Handling multiple exceptions at a time
B. Handling multiple exceptions one after another.
8. Write a Python program illustrating:
A. Handling unknown exception
B. Demonstrate finally and else block.
9. A. Define file and explain different types of files in Python.
B. Write a Python program to create a new file and add the
given text in to the file.
10. A. Explain in detail about seek () and tell () methods.
B. Write a Python program to add the contents into an existing
file and display the contents of a file from the specified position.