IT 117: Intermediate Scripting
Class 05 Ungraded Quiz
-
What are the entries in a dictionary?
-
Do the entries in a dictionary have a definite order?
-
Are dictionaries sequences?
-
If I had a dictionary of email addresses named emails,
what would I write to get the email for the person named 'Chris'?
-
Write the Python statement to create an empty dictionary named
empty.
-
Write the Python statement to change the value for 'Dave' in the dictionary above
to 'dave.souza@hotmail.com'
-
Write the Python statement you would use to create the dictionary
integer_words, where the key is an integer
and the value is the name of the number. Do this for the first 3 integers.
-
What happens when you try to get a value from a dictionary using a key that
is not in the dictionary?
-
Write a
for
loop that prints all the keys in the dictionary
emails.
-
Write a
for
loop that prints all the values in the dictionary
emails.