Page 2 - Home Assignment - DICTIONARY
P. 2
Home Assignment
7. Differentiate clear() and del(). Explain through an example.
8. Write a Python program to create a dictionary to store students records, where dictionary
elements are (AdmNo: (Name, Class, Section)). Write program to read N number of
records and print it.
9. Write a Python script to generate and print a dictionary whose key value pairs are
(X: [X*X, X*X*X]), where X is a number between 1 and n (user input)
10. Write a program to input an integer list. Create a dictionary which contains
(X: frequency of X), where X is an element of the list.
11. Write a program to convert octal to binary number using dictionary, where dictionary
elements are (octal no: equivalent binary).
12. Write a program using dictionary to convert octal to hexadecimal/ hexadecimal to
equivalent octal number, based on user choice. Dictionary elements are
(octal_no: equivalent binary) and (hexa_no: equivalent binary).