Question: Question 4 : Create a comprehensive program that keeps your friends' names and birthdays in a dictionary. Use the screenshot below as a reference. (

Question 4: Create a comprehensive program that keeps your friends' names and birthdays in a dictionary. Use the screenshot below as a reference. (35 pts .)
```
Friends and Their Birthdays }\square\mathrm{ Friends and Their Birthdays
----------------------------------------------------------
1. Look up a birthday
2. Add a new birthday
3. Change a birthday
4. Delete a birthday
5. Quit the program
Enter your choice: 2
Enter a name: Bobbi
Enter a birthday: 12/3/2000
Friends and Their Birthdays
1. Look up a birthday
2. Add a new birthday
3. Change a birthday
4. Delete a birthday
5. Quit the program
Enter your choice: 4
Enter a name: Bobbi
Friends and Their Birthdays
1. Look up a birthday
2. Add a new birthday
3. Change a birthday
4. Delete a birthday
5. Quit the program
Enter your choice: 1
Enter a name: Bobbi
Not found.
```
1. Look up a birthday
2. Add a new birthday
3. Change a birthday
4. Delete a birthday
5. Quit the program
Enter your choice: 2
Enter a name: Kate
Enter a birthday: 5/23/1999
Friends and Their Birthdays
-------------------------------
1. Look up a birthday
2. Add a new birthday
3. Change a birthday
4. Delete a birthday
5. Quit the program
Enter your choice: 3
Enter a name: Kate
Enter the new birthday: 5/25/1999
Friends and Their Birthdays
1. Look up a birthday
2. Add a new birthday
3. Change a birthday
4. Delete a birthday
5. Quit the program
Enter your choice: 5
All done!
(4a) Each entry in the dictionary uses a friend's name as the key, and that friend's birthday as the value. As a result, you can use this program to look up your friends' birthdays by entering their names.
(4b) This program displays a menu via a function that allows the user to make one of the choices below. (10 pts .)
1. Look up a birthday
2. Add a new birthday
3. Change a birthday: Extra credits!
4. Delete a birthday: Extra credits!
5. Quit the program
- Assume the user will enter an integer. However, if the number is out of range, display this message: "Error. Please enter a valid choice:"
(4c) The program starts with an empty dictionary, so you have to choose item 2 from the menu to add a new entry. Store the code that adds a new entry in its own function. (10 pts .)
(4d) Once you have added a few entries you can choose item 1 to look up a specific person's birthday. Store the code that looks up a birthday in its own function. If a name is not found, display "Not found." (10 pts .)
(4e) Extra credits: You can choose item 3 to change an existing birthday in the dictionary or item 4 to delete a birthday from the dictionary. Store item 3 and item 4 in two separate functions. (Bonus: \(\mathbf{15}\) pts.)
(4f) The user can choose item 5 to quit the program. Display "All done!" (5 pts .)
Question 4 : Create a comprehensive program that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!