The document is a Python question bank containing various programming tasks and theoretical questions. It covers topics such as comments, built-in functions, data structures (like dictionaries and tuples), operators, control statements, and basic algorithms. Each question requires practical coding or explanations related to Python programming concepts.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
4 views
Python Question Bank
The document is a Python question bank containing various programming tasks and theoretical questions. It covers topics such as comments, built-in functions, data structures (like dictionaries and tuples), operators, control statements, and basic algorithms. Each question requires practical coding or explanations related to Python programming concepts.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Python Question Bank
1 How to give single and multiline comment in python.
2 List and explain any two built-in functions on set. 3 Program to generate Student Result. Accept marks of five subject and display result according to following conditions:
4 Write a program to create dictionary of students that includes their
ROLL NO. and NAME. i) Add three students in above dictionary ii) Update name = ‘Sangeeta’ of ROLL NO = 10 iii) Delete information of ROLL NO = 1 5 Write in brief about Dictionary in python. Write operations with suitable examples. 6 Program to swap the value of two variables 7 How append() and extend() are different with reference to list in Python? 8 What is the role of indentation in Python? 9 Mention the use of //, **, % operator in Python. 10 List features of Python. 11 Give two differences between list and tuple. 12 Explain identity operators with example. 13 Explain four Buit-in tuple functions python with example.
14 Show the output for the following:
i) >>> a = [2, 5, 1, 3, 6, 9, 7 ] >>> a [ 2 : 6] = [ 2, 4, 9, 0] >>> print (a) ii) >>> b = [ “Hello” , “Good” ] >>> b. append ( “python” ) >>> print (b) iii) >>> t1 = [ 3, 5, 6, 7 ] >>> print (t1 [2]) >>> print (t1 [–1]) >>> print (t1 [2 :]) >>> print (t1 [:]) 15 Write a python program to print Fibonacci series up to n terms, 16 Explain if-else statement with an example. 17 Is tuple mutable? Demonstrate any two methods of tuple. 18 Explain about different logical operators in Python with appropriate examples 19 Write a Python program to print factorial of a number. Take input from user. 20 . Define the following terms: (i) Identifier (ii) Variables (iii) Data type (iv) Tuple (v) List.