Write a program that keeps names and email addresses in a Dictionary as key-value pairs. The...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that keeps names and email addresses in a Dictionary as key-value pairs. The program should let the user look up a person's email address, add a new name and email address, change an existing email address, and delete an existing name and email address. The program should save the contents of the Dictionary to a file when the user exits the program. Each time the program starts, it should retrieve the information from the file and restore the Dictionary. Write a program that keeps names and email addresses in a Dictionary as key-value pairs. The program should let the user look up a person's email address, add a new name and email address, change an existing email address, and delete an existing name and email address. The program should save the contents of the Dictionary to a file when the user exits the program. Each time the program starts, it should retrieve the information from the file and restore the Dictionary.
Expert Answer:
Answer rating: 100% (QA)
here is the python code import json Function to load data from a file def loaddatafilename try with ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
You are in a car, sitting at one end of a long straight track. At the other end of the track is a loudspeaker emitting sound waves at 265 Hz. You step on the gas and accelerate steadily toward the...
-
Write an address book program that stores your contacts' names and their email addresses. The names and email addresses are originally stored in a file called phonebook.in, in the format: Harry...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
In the Tokyo subway system, routes are labeled by letters and stops by numbers, such as G-8 or A-3. Stations allowing transfers are sets of stops. Find a Tokyo subway map on the web, develop a simple...
-
A small sphere that carries a charge q is whirled in a circle at the end of an insulating string. The angular frequency of rotation is w. What average current does this rotating charge represent?
-
An ambulance traveling at 44 m/s approaches a car heading in the same direction at a speed of 28 m/s. The ambulance driver has a siren sounding at 550 Hz. At what frequency does the driver of the car...
-
With reference to the previous exercise, construct a 98% confidence interval for the true population mean number of unremovable defects per display. Data From Previous Exercise 7.5 The manufacture of...
-
Clear channel, an owner of multiple radio stations with the Top 40 format, recently bought rock concert promoter Live Nation. How would this affect prices for concert tickets or rates for radio...
-
Skuta Pty Ltd Scenario The scenario provides you with a brief overview of a hypothetical company, 'Skuta' and a contemporary scenario. Be aware that the scenario may not cover every detail that you...
-
The file P17_19.xlsx contains various data on 325 metropolitan cities in the United States. Cell comments in row 1 explain some of the variables. A Microsoft Data Mining add-in (not discussed here)...
-
Dandelion Company (the Company) is a public entity with a December 31 fiscal year-end. The Company is an accelerated filer that issues annual and quarterly consolidated financial statements prepared...
-
On the sheet called Income Statement, in cell E14 create the formula for the Income Tax. On the sheet called Income Statement, make cell C14 is the only cell that the enduser can type in. Protect the...
-
I sign a contract that guarantees me an immediate payment of $2 000, but then I have to invest $800 a year for ten years. At the end of the tenth year, I get a further payment of $8 000. If I can...
-
A small block slides down a frictionless track whose shape is described by y = ( x ^ 2 ) / d for x < 0 and by y = - ( x ^ 2 ) / d for x > 0 . The value of d is 2 . 8 8 m , and x and y are...
-
Select all that apply, then click Submit below Response 1 of 4: Jennifer would prefer to use the internal rate of return, which is more accurate.Jennifer would prefer to use the internal rate of...
-
Provide a summary on political neutrality and impartiality, considering the various perspectives in political science or international relations?
-
If students get As on a test then they know the material, right? How many of those students would still know the information if you asked them about a week later? How about a month later? Most...
-
The Heese Restaurant Group manufactures the bags of frozen French fries used at its franchised restaurants. Last week, Heeses purchased and used 101,000 pounds of potatoes at a price of $ 0.70 per...
-
What are the three forms a C-style string can take in a C++ program?
-
Write overloaded versions of iquote(), a function that displays its argument enclosed in double quotation marks. Write three versions: one for an int argument, one for a double argument, and one for...
-
The function judge() has a type int return value. As an argument, it takes the address of a function. The function whose address is passed, in turn, takes a pointer to a const char as an argument and...
-
Suppose government spending increases. Would the effect on AD be larger if the central bank took no action in response, or if the central bank were committed to maintaining a fixed interest rate?...
-
How might a government use taxation as a tool in expansionary fiscal policy?
-
What reasons are put forward for keeping central banks independent in setting monetary policy?
Study smarter with the SolutionInn App