Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question :1 Write a Python program that reads the data from the attached pipe-delimited world_gdp_data.txt file into a dictionary whose keys are country names and

Question :1

Write a Python 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.

world_gdp_data.txt file :- https://mega.nz/#!A7hXxQwT!B6PhiIz4uHsKJaoa-U_il3427m_x1nAQaqoSRHkCga8

Sol:- https://mega.nz/#!NuQ0VBgD!wxivgDNOcKoace3bgQgrnaqLczMMFgjk0-hjYmNpFek

Modify the Above 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To Database 2

Authors: Bruce L. Larson

1st Edition

0070232679, 978-0070232679

More Books

Students also viewed these Databases questions