Question: Write a program that reads the data from the attached pipe-delimited world_gdp_data.txt file into a dictionary whose keys are country names and whose values are
Write a program that reads the data from the attached pipe-delimited world_gdp_data.txt file into a dictionary whose keys are country names and whose values are the corresponding per capita GDP values. Then the program should prompt the user to enter country names and display the corresponding GDP values until the user enters quit.
From the above python program we need to modify and do the following.
In python,Modify the previous program to make it more user-friendly. Since the exact spelling of country names can be difficult to remember, enhance the program to allow the user to enter a single character at the prompt to display a list of countries whose names start with that letter. Use a dictionary whose keys are letters and whose values are sets of country names that begin with a given letter.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
