IT 117: Intermediate Scripting - Class 5 Ungraded Quiz

  1. What are the entries in a dictionary?

  2. Do the entries in a dictionary have a definite order?

  3. Are dictionaries sequences?

  4. If I had a dictionary of email addresses named emails, what would I write to get the email for the person named 'Chris'?

  5. If I wanted to add the email address '' to the dictionary emails using the key 'Dave', what Python statement would I write?

  6. Write the Python statement to change the value for 'Dave' in the dictionary above to ''

  7. 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.

  8. What happens when you try to get a value from a dictionary using a key that is not in the dictionary?

  9. Write a for loop that prints all the keys in the dictionary emails.

  10. Write a for loop that prints all the values in the dictionary emails.