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

Python Question Bank

The document contains a question bank for Python programming divided into 4 units. The units cover topics like Python features, data types, operators, control flow statements, files, OOP concepts, exceptions, and GUI programming using tkinter.

Uploaded by

Anuj Mourya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Python Question Bank

The document contains a question bank for Python programming divided into 4 units. The units cover topics like Python features, data types, operators, control flow statements, files, OOP concepts, exceptions, and GUI programming using tkinter.

Uploaded by

Anuj Mourya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Question Bank of Python Programming

Unit 1

1. Describe the features of Python.


2. Explain the Identifiers, Keywords, Statements, Expression and variables in Python programming language
with examples.
3. What are different data types supported by Python.
4. Describe the mutable and immutable variables with examples.
5. Write Python code to find the factorial of a number.
6. Explain the string operations used in Python programming.
7. Explain the different loop patterns available In Python.
8. Illustrate the different types of control flow statements available in Python with flowcharts.
9. Explain the need for continue and break statements.
10. Discuss the methods associated with the file object
a) read() b) readline() c) readlines() d) tell() e) seek() f) write()
11. Describe the different access modes of the files with an example.
12. Explain directory methods in Python.
13. Discuss the concept of Indexing and slicing in string with the example.
14. Demonstrate briefly about the features of Python programming language and also write various data
types with their sizes.
15. Illustrate the use of input and output statements with the necessary syntax and write example program.
16. What is an operator and explain about the arithmetic operators and assignment operators in Python with
example.

Unit 2

1. Explain the all list methods with an example.


2. Check if the items in the list are sorted in ascending or descending order and print suitable messages
accordingly. Otherwise, print “Items in list are not sorted”
3. What are different ways to sort the list and dictionary in Python?
4. Write a Python program to input information for n number of students as given below:
i. Name
ii. Registration number
iii. Total Marks
5. What are lists? How to define and access the elements of List? Also discuss the operations on list.
6. Write Python program to check for the presence of a key in the dictionary and find the sum of all its
values.
7. Write Python program to count the number of characters in a string using dictionaries. Display the keys
and their values in alphabetical order.
8. Write Python program to generate a dictionary that contains (i=i*i) such that I is a number ranging from
1 to n.
9. Define sorting and write a program to implement bubble sorting technique.
10. Write code snippets in Python to perform the accessing elements of a tuple, modifying elements of a tuple,
and deleting elements of a tuple.

Unit 3

1. What are the main features of OOPs?


2. Describe the relationship between a class and object? Write a program which shows how to define a
class, how to access member functions and how to create and access objects in python.
3. List and explain various object oriented programming concepts available in Python programming.
4. What is Encapsulation and Data Abstraction?
5. What is method overloading and method overriding?
6. Describe class and Instance variables with an example.
7. Discuss inheritance in Python programming language.
8. Write Python program to demonstrate Multiple Inheritance.
9. Write Python code to overload “+”, “-” and “*” operators by providing the methods __add__, __sub__ and
__mul__.
10. Describe the need for catching exceptions using try and except statements.

Unit 4

1. Explain GUI in python and state its advantages and disadvantages.


2. What is grid layout? Give suitable example.
3. What are the different types of available in message widget of tkinter module?
4. With the help of proper example explain radio button widget in tkinter module.
5. Write a python GUI that contains three Radio buttons for colors “Red”, “Green”, and “Blue”.
Display selected color on a label.
6. How to apply font on tkinter widgets? Explain with examples.
7. With the help of proper example explain listbox widget in tkinter.

You might also like