Chapter 9 Part 1 – Create a Dictionary
• Write a program that creates a dictionary called emails that will contain
names and email addresses, where name is the key and email address is
the value.
• In main, call a function called create dictionary to create and add
entries to the dictionary. This function should return the dictionary to
main where it should be stored in the emails variable.
• In the create dictionary function, create a new dictionary called
emails and in a while loop, ask the user to enter names and email
addresses until they choose to stop. Return the emails dictionary to
main.
• In main, upon receiving the emails dictionary, print how many entries are
in the dictionary, using the len function.
• In main, print the keys and values in the dictionary using a for loop.