Python Quiz
Python Quiz
Python Quiz
All questions are compulsory and carry equal marks. There is no negative marking.
1. Enrollment Number: *
2. Name *
Dictates what happens before the program starts and after it terminates
https://docs.google.com/forms/d/1m_vvGc8iSRselXxYdxyvWWcaYVec65PRRLyN1HgmthU/edit 1/6
4/24/24, 9:59 AM Python Quiz
1234
124
200 300
It raises an exception
[200, 300]
(200, 300)
https://docs.google.com/forms/d/1m_vvGc8iSRselXxYdxyvWWcaYVec65PRRLyN1HgmthU/edit 2/6
4/24/24, 9:59 AM Python Quiz
7. Consider again this nested structure definition: The statement 'z' in x[2] is * 2 points
True or False?
True
False
8. What method call will delete the entry whose value is 200 from this * 2 points
del d[‘second’]
del d(‘second’)
d.pop(‘second’)
remove d(‘second’)
https://docs.google.com/forms/d/1m_vvGc8iSRselXxYdxyvWWcaYVec65PRRLyN1HgmthU/edit 3/6
4/24/24, 9:59 AM Python Quiz
33
14
13
36
10. Write a program to add values of same keys of two dictionary * 2 points
Output:
{'a':400, 'b': 300, 'c': 300, 'd':400}
11. Write a program to print mirror characters in a string after nth position 2 points
I/P: N =3
paradox
O/P
paizwlc
https://docs.google.com/forms/d/1m_vvGc8iSRselXxYdxyvWWcaYVec65PRRLyN1HgmthU/edit 4/6
4/24/24, 9:59 AM Python Quiz
12. Write a Python program to create all possible strings by using 'a', 'e', 'i', 'o', 'u'.
Use the characters exactly once
13. Write a Python program to get the maximum and minimum value in a 1 point
dictionary.
14. Write a function that takes a number as an input parameter and returns 1 point
https://docs.google.com/forms/d/1m_vvGc8iSRselXxYdxyvWWcaYVec65PRRLyN1HgmthU/edit 5/6
4/24/24, 9:59 AM Python Quiz
15. Write a program to remove duplicates values across dictionary values 5 points
Forms
https://docs.google.com/forms/d/1m_vvGc8iSRselXxYdxyvWWcaYVec65PRRLyN1HgmthU/edit 6/6