Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
6.1. Given a list of names and birthdays, create a hash to store them. Print the contents of the hash. If you don’t know anyone’s birthday, you can use this list: Fred’s birthday is April 5, Wilma’s is October 26, and Pebbles is October 8. Check a Flintstones episode guide if you don’t believe me! (Answer to Exercise 6.1)
6.2. Modify the program from Exercise 6.1 so it prompts for the user for a name, and then reports the birthday for that name. (Answer to Exercise 6.2)
6.3. What happens in your program from Exercise 6.2 if the user asks for the birthday for someone who is not in the hash? Modify the program you created for Exercise 6.2 to warn the user if the key is not in the hash. (Answer to Exercise 6.3)