This document contains important questions about Python. It is divided into two parts. Part A asks questions about Python fundamentals like advantages over other languages, data types, functions, OOP concepts, modules and file handling. Part B focuses on specific Python concepts in more detail, including loops, lists, strings, dictionaries, exceptions, anonymous functions and file I/O methods. The questions cover a wide range of fundamental and advanced Python topics to test knowledge of the language.
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0 ratings0% found this document useful (0 votes)
253 views1 page
Python Important Questions
This document contains important questions about Python. It is divided into two parts. Part A asks questions about Python fundamentals like advantages over other languages, data types, functions, OOP concepts, modules and file handling. Part B focuses on specific Python concepts in more detail, including loops, lists, strings, dictionaries, exceptions, anonymous functions and file I/O methods. The questions cover a wide range of fundamental and advanced Python topics to test knowledge of the language.
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 1
Python Important Questions.
Part – A
1. List the advantages of python over other programming languages.
2. Write a python program to find the factorial of a number given by the user. 3. Write python script to swap two numbers without intermediate variable. 4. Differentiate strings and lists in python. 5. Write a note on methods of set, a sequence container in python. 6. Elaborate list comprehensions with example. 7. Define function. Explain recursive function with example. 8. Explain the various modes of opening a file in python. 9. Illustrate using the python program to create a class and access its object. 10. List the benefits of oops. 11. Explain the structure of the python program? Illustrate it using the python program of adding two numbers . 12. Discuss briefly on any three important modules in python.
Part – B
1. Elaborate the loop ing constructs in python with example.
2. Write detailed notes on datatypes in python. 3. Discuss in detail about list and its methods and operations in python. 4. List the methods in python to search in a string with example. 5. Write a python code to find and display the non-duplicate characters in a string entered by the user. Example Input : This is Example”. Output : “Thxampl”. 6. What is dictionary ? How to add, remove, access and replace key in a dictionary in python. 7. Elaborate on any five file handling methods in python . 8. List the methods for exceptional handling with example. 9. Elucidate on anonymous functionsi n python. 10. Explain abstract classes in python with example. 11. Write a python program to create a class accountholder with attributes accountno, acc_name, balance with methods deposit() and withdraw(). The withdrawal of the money is allowed only if balance is above 5000INR. 12. Define list. Explain its operations using methods in python. 13. List any 8 methods used for string manipulations in python . 14. List and explain the methods used for read and write operations in python. 15. Write detailed notes on lambda function and iterators in python.