Question
Write a Python program that quizzes a player/user to identify the capital of each country in South America. Your program will list the name of
Write a Python program that quizzes a player/user to identify the capital of each country in South America. Your program will list the name of each country, ask the user to enter the name of its capital and then compare their answer given to the correct capital city. Provide correct or incorrect feedback and score 1 point for every correct answer. At the end of the quiz report their score, percent correct and the (sorted alphabetically) list of the countries with their capital cities.
You should create a text list of the 13 countries of South America with their capitals (1 per line). Read the text file into a dictionary that uses the country name as the key and the capital as the value.
Country | Capital |
Argentina | Buenos Aires |
Bolivia | La Paz & Sucre |
Brazil | Braslia |
Chile | Santiago |
Colombia | Bogot |
Ecuador | Quito |
Guyana | Georgetown |
Paraguay | Asuncin |
Peru | Lima |
Suriname | Paramaribo |
Uruguay | Montevideo |
Venezuela | Caracas |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started