Question: Group Program 2 - - State Capitals Write a program that creates a quiz involving state capitals. The program should read the file state _
Group Program State Capitals
Write a program that creates a quiz involving state capitals. The program should read the file
statecapitals.txt into a list. The file contains pairs of records: record state; record state's
capital. Remember to remove the newline character from the end of each input record using the
rstrip method
The program should then quiz the user by displaying a state and asking the user to enter its
capital. Requirements for the quiz:
the program should choose the state randomly from the list it creates
the program should accept upper or lower case input eg either Albany or albany
if the user guesses incorrectly, they should be given these options:
O try again with that state
O try a different state
o quit the program;
if the user chooses to try a different state or quit, heshe should be given the correct
answer
if the user guesses correctly, heshe should be told how many tries it took to get the right
answer and then given the option of playing again or quitting
if the user plays again, heshe should be asked to identify a different state capital the
state should not be repeated during one execution of the program
the program should include a main function and at least one other more if you wish
The design of the output is up to you and your team. Remember that the user experience is very
important so it should be simple and intuitive yet want the player to play another game.
Submission: Only ONE member of the group should upload the solution to Blackboard. Please
put your names in the comments of the Python file. Name the file StateCapitals.py
PLEASE USE BASIC LANGUAGE PYTHON
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
