Question: Exercise 3: In this exercise, you will be developing a geography quiz that tests kids on their knowledge of countries and their capitals. Download the

 Exercise 3: In this exercise, you will be developing a geography

quiz that tests kids on their knowledge of countries and their capitals.

Exercise 3: In this exercise, you will be developing a geography quiz that tests kids on their knowledge of countries and their capitals. Download the CountriesCapitals.txt file given next to the lab link. This file has the country name on one line followed by its capital on the next: Afghanistan Kabul Albania Tirana Etc. Store the Country-Capital pairs as items in an unordered list. Your application must randomly select a country or a city and ask a question that matches a country to a capital or a capital to a country. It should then search the unordered list and report whether that answer is correct or incorrect. At the end of the program, display a statistic of how well the player answered the questions. Here's a sample screen dialog Welcome to the Country-Capital Quiz Play? Yes What is the capital of Canada? Ottawa Correct. Play? Yes What country has Vienna as its capital? Austria Correct. Play? Yes What is the capital of Albania? Algiers

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 Databases Questions!