Professional Documents
Culture Documents
17.
18. WAP that creates a tuple storing first 9 items of Fibonacci Series.
19. WAP that creates a third tuple after adding two tuples. Add second after first tuple.
20. WAP to calculate the mean of the numbers of the tuple.
21. WAP to calculate the average of the numbers of the tuple.
DICTIONARY
1. What is a dictionary?
2. What are the differences between lists and dictionary?
3. Can list be used as a key to dictionary? State yes or no. Justify.
4. Can you change the order of the dictionaries contents?
5. What is a key value pair in dictionary?
6. Can you modify the keys and values in a dictionary?
7. How will you create a dictionary?
8. “Dictionaries are mutable”. Justify
9. Explain the operations of Dictionary.
10. Discuss the utility and significance of Dictionaries
11. Why is a dictionary termed as an unordered collection of objects?
12. How is clear() function different from del Statement?
13. What is the output produced by the following code –
14.
15. Write a program to accept values from the user. Add a tuple to it and display its
element one by one. Also display its maximum and minimum values.
16. Write a program to store student names and their phone numbers to store it in a
dictionary and print the phone number of a particular name.
17. WAP that repeatedly asks the user to enter product names and prices. Store all of them
in a dictionary whose keys are product names and values are prices. And also write a
code to search an item from the dictionary.
18. WAP to create a dictionary named year whose keys are month names and values are
their corresponding number of days.
***********