Assignment-2 Python Programming 402
Assignment-2 Python Programming 402
4. Explain how to use the keys() method in Python dictionaries. Given the dictionary 01
student = {'name': 'Alice', 'age': 22, 'course': 'Math'}, demonstrate how to print all the
keys.
5. Explain how to use the insert() method in Python lists. Given the list fruits = ['apple', 01
'banana', 'cherry'], demonstrate how to insert the element 'kiwi' at index 1.
6. Explain how to use the append() method in Python lists. Given the list colors = ['red', 01
'blue', 'green'], demonstrate how to add a new color, 'yellow', to the end of the list.
wise Mapping Matrix (with AO, CO, BTL) Weightage (in %age)
Q. No. 1 2 3 4 5 6 7 8 9 10 11 12 AO 1:50%, 2:25%, 3.25%
AO No. 1 2 2 1 2 1 2 1 2 2 3 2 CO 1:46%, 2:54%
CO No. 1 1 1 1 2 1 1 1 1 3 4 5 1:17%, 2:33%, 3:33%,
BTL
BTL 1 2 2 3 3 3 4 1 4 2 2 3 4:17%
Marks 1 1 1 1 1 1 2 2 4 4 5 5