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

Python Programming Question Bank

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)
6 views2 pages

Python Programming Question Bank

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

Question Bank Python

1. Name different modes of Python


2. List identity operators in python
3. Give two differences between list and tuple
4. How to give single and multiline comment in Python
5. List data types used in Python. Explain any two with example
6. Explain membership and assignment operators with example
7. Explain indexing and slicing in list with example
8. Write a program to create dictionary of student that includes their ROLL NO and NAME
i) Add three students in above dictionary
ii) Update name=’Shreyas’ of ROLL NO=2
iii) Delete information of ROLL NO=1
9. Explain decision making statements If-else, if-elif-else with example
10. Explain building blocks of python
11. Write the output of the following
i) >>> a=[2,5,1,3,6,9,7]
>>> a[2:6]=[2,4,9,0]
>>> print(a)
ii) >>> b=*“Hello”,”Good”+
>>> [Link](“python”)
>>>print(b)
iii) >>>t1=[3,5,6,7]
>>>print(t1[2])
>>>print(t1[-1])
>>>print(t1[2:])
>>>print(t1[:])
12. List Python features. (Any four)
13. List comparision operators in Python.
14. Describe indentation in Python
15. Describe bitwise operators in Python with example.
16. Write any four methods of dictionary.
17. Write python program to illustrate if else ladder.
18. Write Python code for finding greatest among four numbers.
19. Compare list and dictionary.
20. Write python program to perform following operations on Set i) Create set ii) Access set
Element iii) Update set iv) Delete set
21. Explain mutable and immutable data structures.
22. Write syntax for a method to sort a list.
23. Print the following pattern using loop:
1010101
10101
101
1
24. Write aprogram to print alphabet F using loop.
25. Write a python program that takes a number and checks whether it is a palindrome.
26. Write a python program takes in a number and find the sum of digits in a number.
27. Write a program function that accepts a string and calculate the number of uppercase
letters and lower case letters.
28. Write the output for the following if the variable course = “Python” >>> course * : 3 + >>>
course [ 3 : ] >>> course [ 2 : 2 ] >>> course [ : ] >>> course [ -1 ] >>> course [ 1 ]
29. Enlist applications for python programming
30. Write the use of elif keyword in python.
31. Describe the Role of indentation in python.
32. Explain two ways to add objects / elements to list.
33. Write python program to display output like.
2
468
10 12 14 16 18
34. Explain use of Pass and Else keyword with for loops in python.
35. T = (‘spam’, ‘Spam’, ‘SPAM!’, ‘SaPm’) print (T*2+) print (T*-2]) print (T[2:]) print (List (T))
36. Explain different functions or ways to remove key : value pair from Dictionary
37. Write down the output of the following Python code
>>>indices=['zero','one','two','three','four','five'] i) >>>indices[:4] ii) >>>indices[:-2]
38. Describe any two data conversion function.
39. Explain creating Dictionary and accessing Dictionary Elements with example.
40. Write a python program to input any two tuples and interchange the tuple variables.
41. Write a Python program to find the factorial of a number provided by the user.
42. Write a Python Program to accept values from user in a list and find the largest number and
smallest number in a list.

You might also like