0% found this document useful (0 votes)
7 views2 pages

Python Exam Questions

The document lists important and frequently asked Python questions across various topics such as Python basics, data structures, file handling, object-oriented programming, and exception handling. It includes specific questions, programming tasks, and comparisons that are essential for understanding Python. Additionally, it highlights the most frequently asked code-based programs and their occurrence in interviews.

Uploaded by

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

Python Exam Questions

The document lists important and frequently asked Python questions across various topics such as Python basics, data structures, file handling, object-oriented programming, and exception handling. It includes specific questions, programming tasks, and comparisons that are essential for understanding Python. Additionally, it highlights the most frequently asked code-based programs and their occurrence in interviews.

Uploaded by

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

Most Important & Repeated Python (22616) Questions

🔁 Most Repeated & Important Questions

✅ Python Basics

• List features of Python.


• List data types used in Python. Explain any two with example.
• Define class and object.
• Explain the concept of indentation in Python.
• Explain decision-making statements ( if-else , if-elif-else ) with example.

✅ Data Structures

• Compare List vs Tuple (any 4 points).


• List any four list methods and explain any two.
• Explain any four set operations with example.
• How to create and use dictionary in Python? List any three methods.

✅ File Handling

• Describe various modes of file object. Explain any two/three.


• Explain seek() and tell() functions.
• Program to read from one file (e.g. first.txt ) and write to another (e.g. second.txt ).
• Write syntax of open() and write() functions.

✅ Object-Oriented Programming

• Explain method overloading and overriding.


• Describe the concept of inheritance in Python.
• Explain multiple inheritance with a program.
• Design a class Student with Name , Roll No. , Address and suitable methods.

✅ Modules & Packages

• Write a program illustrating the use of user-defined package or module.


• How to import and alias modules?

✅ Operators

• Explain membership and identity operators with examples.


• Explain assignment operators.

✅ Exception Handling

• Explain try-except-else-finally block with example.


• Write a program to check for ZeroDivisionError.
• Write a Python program for user-defined exception (e.g. password validation).

1
✅ Standard Libraries / Packages

• Describe NumPy and Pandas with usage.


• Write a Python program to generate random numbers using NumPy.
• Use of matplotlib in Python (basic explanation).

✅ String / Indexing / Slicing

• Given a string (e.g., "Python" or "banana" ), write output for:


• str[:3] , str[3:] , str[2:2] , str[:] , str[-1] , str[1]

✅ Pattern / Miscellaneous Programs

• Print pattern using loops (e.g., 1 0 1...).


• Program to find the sum of digits in a number.
• Program to count uppercase and lowercase letters in a string.
• Program to check if a number is a palindrome.

📌 Most Frequently Asked Programs (Code-based)

Program Topic Frequency

Create class Student and display contents 3x

Read and write to files ( a.txt → b.txt ) 3x

Pattern printing (numbers, loops) 2x

Use of user-defined module/package 3x

Use of inheritance (including multiple inheritance) 3x

String slicing output questions 2x

Set operations (create, update, remove) 2x

You might also like