8. Name and Email Addresses Write a program that keeps names and email addresses in a dictionary as key-value pairs. The program should display a menu that lets the user look up a person's email address, add a new name and email address, change an existing email address, and delete an exist- ing name and email address. The program should pickle the dictionary and save it to a file when the user exits the program. Each time the program starts, it should retrieve the dictionary from the file and unpickle it.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
100%
Chapter 9 Programming exercise 8
1904 or 1994. There are thrics in the file indicating this.)
in
that reads this file and creates a dictionary in which the keys are the names
Jelles was not played
Write a
program
of the teams, and each key's associated value is the number of times the team has won the
World Series. The program should also create a dictionary in which the keys are the years,
and each key's associated value is the name of the team that won that year.
The program should prompt the user for a year in the range of 1903 through 2009. It
should then display the name of the team that won the World Series that year, and the
number of times that team has won the World Series.
8. Name and Email Addresses
Write a program that keeps names and email addresses in a dictionary as key-value pairs.
The program should display a menu that lets the user look up a person's email address,
add a new name and email address, change an existing email address, and delete an exist-
ing name and email address. The program should pickle the dictionary and save it to a
file when the user exits the program. Each time the program starts, it should retrieve the
dictionary from the file and unpickle it.
9. Blackjack Simulation
of
Previously in this chapter you saw the card_dealer.py program that simulates cards being
dealt from a deck. Enhance the program so it simulates a simplified version of the
Blackjack between two virtual players. The cards have the following values:
game
• Numeric cards are assigned the value they have printed on them. For example, the value
of the 5 of diamonds is 5.
Transcribed Image Text:1904 or 1994. There are thrics in the file indicating this.) in that reads this file and creates a dictionary in which the keys are the names Jelles was not played Write a program of the teams, and each key's associated value is the number of times the team has won the World Series. The program should also create a dictionary in which the keys are the years, and each key's associated value is the name of the team that won that year. The program should prompt the user for a year in the range of 1903 through 2009. It should then display the name of the team that won the World Series that year, and the number of times that team has won the World Series. 8. Name and Email Addresses Write a program that keeps names and email addresses in a dictionary as key-value pairs. The program should display a menu that lets the user look up a person's email address, add a new name and email address, change an existing email address, and delete an exist- ing name and email address. The program should pickle the dictionary and save it to a file when the user exits the program. Each time the program starts, it should retrieve the dictionary from the file and unpickle it. 9. Blackjack Simulation of Previously in this chapter you saw the card_dealer.py program that simulates cards being dealt from a deck. Enhance the program so it simulates a simplified version of the Blackjack between two virtual players. The cards have the following values: game • Numeric cards are assigned the value they have printed on them. For example, the value of the 5 of diamonds is 5.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Dictionary
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT