Do Now 6.01

  1. Type and run the following code:

    my_dictionary = {
     'cat': 'a domestic feline', 
     'dog': 'a domestic canine', 
     'chair': 'furniture piece for sitting', 
     'car': 'automobile'
     }
    print(my_dictionary)
    print(my_dictionary['dog'])
    print(my_dictionary.get('dog'))
    print('cat' in my_dictionary)
    print('monkey' in my_dictionary)
    

    Write down what was printed out. What type is my_dictionary?


  2. Add a line of code that will print the definition of 'chair', then run the code again.


  3. Write down what happens if you use my_dictionary['kittens']? What do you think that error means?