Skip to content

Commit 5a2351a

Browse files
Update StateCapitals.py
1 parent d1cb8f4 commit 5a2351a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Beginers/DictOfStateCapitals/StateCapitals.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""We have an existing dictionary that maps US states to their capitals.
22
3-
Print the state capital of Idaho
4-
Print all states.
5-
Print all capitals.
6-
Create a single string 'Alabama -> Montgomery, Alaska -> Juneau, ...'
7-
8-
Now we want to add the reverse look up, given the name of a capital what state
3+
1. Print the state capital of Idaho
4+
2. Print all states.
5+
3. Print all capitals.
6+
4. Create a single string 'Alabama -> Montgomery, Alaska -> Juneau, ...'
7+
5. Ensure the string you created in 4. is alphabetically sorted by state
8+
7. Now we want to add the reverse look up, given the name of a capital what state
99
is it in?
1010
1111
Implement the function def get_state(capital): below so it returns the state.

0 commit comments

Comments
 (0)