The program displays information for a state typed in by the user. When the user types in the name of a state, the program should display the state’s capital, the state bird, and the order the state joined the union (1st, 2nd, 3rd, etc.) The program does the following:
-
Initialize lists to store information about states: There are three lists in total: The first one is the list of the names of the states, The second one is the list of state birds for state birds per state, And the last list is for the order number, the state joined the union. The program demonstrates how to store information in a structure or dictionary.
-
There's the use of I/0 where the user enters the name of the state
-
The program finds the index of that name. It uses the index function to find the index name entered by the user.
-
Use that index to report back to the user the name of the capital, the state bird, and the order in which the state joined the union
-
Below is how the program looks like: