Question: In python,Write a program that creates a dictionary containing the names of the 28 countries of the Euopean Union as keys and their capitals as
In python,Write a program that creates a dictionary containing the names of the 28 countries of the Euopean Union as keys and their capitals as values. The program should then randomly quiz the user by displaying the name of a country and asking the user to enter that country's capital. The program should keep a count of the number of correct and incorrect responses. You can use the comma-delimited data from the attached eu.txt file. to develop and test your program.
Following is the eu.txt.file:
Country,Capital Austria,Vienna Belgium,Brussels Bulgaria,Sofia Croatia,Zagreb Cyprus,Nicosia Czech Republic,Prague Denmark,Copenhagen Estonia,Tallinn Finland,Helsinki France,Paris Germany,Berlin Greece,Athens Hungary,Budapest Ireland,Dublin Italy,Rome Latvia,Riga Lithuania,Vilnius Luxembourg,Luxembourg Malta,Valletta Netherlands,Amsterdam Poland,Warsaw Portugal,Lisbon Romania,Bucharest Slovakia,Bratislava Slovenia,Ljubljana Spain,Madrid Sweden,Stockholm United Kingdom,London
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
