File tree Expand file tree Collapse file tree 2 files changed +109
-3
lines changed
days/07-09-data-structures Expand file tree Collapse file tree 2 files changed +109
-3
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,13 @@ Follow the instructions on page once you've redeemed the Bite and see if you can
2525
2626## Day N+2: Your Turn!
2727
28- Create a script that imports the data structures contained in the following script file in our Repo:
28+ Create a script that imports the US States data structures contained in the following script file in our Repo:
2929
30- Perform the following tasks on the data structures:
30+ Perform the following tasks on the list and dict without looking at their contents first! Hint: Dicts are unsorted.
3131
3232- Print out the 10th item in each.
3333
34- - Print out the 18th key in the dictionary.
34+ - Print out the 45th key in the dictionary.
3535
3636- Print out the 27th value in the dictionary.
3737
Original file line number Diff line number Diff line change 1+ #!python3
2+
3+ us_state_abbrev = {
4+ 'Alabama' : 'AL' ,
5+ 'Alaska' : 'AK' ,
6+ 'Arizona' : 'AZ' ,
7+ 'Arkansas' : 'AR' ,
8+ 'California' : 'CA' ,
9+ 'Colorado' : 'CO' ,
10+ 'Connecticut' : 'CT' ,
11+ 'Delaware' : 'DE' ,
12+ 'Florida' : 'FL' ,
13+ 'Georgia' : 'GA' ,
14+ 'Hawaii' : 'HI' ,
15+ 'Idaho' : 'ID' ,
16+ 'Illinois' : 'IL' ,
17+ 'Indiana' : 'IN' ,
18+ 'Iowa' : 'IA' ,
19+ 'Kansas' : 'KS' ,
20+ 'Kentucky' : 'KY' ,
21+ 'Louisiana' : 'LA' ,
22+ 'Maine' : 'ME' ,
23+ 'Maryland' : 'MD' ,
24+ 'Massachusetts' : 'MA' ,
25+ 'Michigan' : 'MI' ,
26+ 'Minnesota' : 'MN' ,
27+ 'Mississippi' : 'MS' ,
28+ 'Missouri' : 'MO' ,
29+ 'Montana' : 'MT' ,
30+ 'Nebraska' : 'NE' ,
31+ 'Nevada' : 'NV' ,
32+ 'New Hampshire' : 'NH' ,
33+ 'New Jersey' : 'NJ' ,
34+ 'New Mexico' : 'NM' ,
35+ 'New York' : 'NY' ,
36+ 'North Carolina' : 'NC' ,
37+ 'North Dakota' : 'ND' ,
38+ 'Ohio' : 'OH' ,
39+ 'Oklahoma' : 'OK' ,
40+ 'Oregon' : 'OR' ,
41+ 'Pennsylvania' : 'PA' ,
42+ 'Rhode Island' : 'RI' ,
43+ 'South Carolina' : 'SC' ,
44+ 'South Dakota' : 'SD' ,
45+ 'Tennessee' : 'TN' ,
46+ 'Texas' : 'TX' ,
47+ 'Utah' : 'UT' ,
48+ 'Vermont' : 'VT' ,
49+ 'Virginia' : 'VA' ,
50+ 'Washington' : 'WA' ,
51+ 'West Virginia' : 'WV' ,
52+ 'Wisconsin' : 'WI' ,
53+ 'Wyoming' : 'WY' ,
54+ }
55+
56+
57+ states_list = ['Oklahoma' ,
58+ 'Kansas' ,
59+ 'North Carolina' ,
60+ 'Georgia' ,
61+ 'Oregon' ,
62+ 'Mississippi' ,
63+ 'Minnesota' ,
64+ 'Colorado' ,
65+ 'Alabama' ,
66+ 'Massachusetts' ,
67+ 'Arizona' ,
68+ 'Connecticut' ,
69+ 'Montana' ,
70+ 'West Virginia' ,
71+ 'Nebraska' ,
72+ 'New York' ,
73+ 'Nevada' ,
74+ 'Idaho' ,
75+ 'New Jersey' ,
76+ 'Missouri' ,
77+ 'South Carolina' ,
78+ 'Pennsylvania' ,
79+ 'Rhode Island' ,
80+ 'New Mexico' ,
81+ 'Alaska' ,
82+ 'New Hampshire' ,
83+ 'Tennessee' ,
84+ 'Washington' ,
85+ 'Indiana' ,
86+ 'Hawaii' ,
87+ 'Kentucky' ,
88+ 'Virginia' ,
89+ 'Ohio' ,
90+ 'Wisconsin' ,
91+ 'Maryland' ,
92+ 'Florida' ,
93+ 'Utah' ,
94+ 'Maine' ,
95+ 'California' ,
96+ 'Vermont' ,
97+ 'Arkansas' ,
98+ 'Wyoming' ,
99+ 'Louisiana' ,
100+ 'North Dakota' ,
101+ 'South Dakota' ,
102+ 'Texas' ,
103+ 'Illinois' ,
104+ 'Iowa' ,
105+ 'Michigan' ,
106+ 'Delaware' ]
You can’t perform that action at this time.
0 commit comments