Question: In your python file, create the following variables: Create a list named animals with 7 different animals aselements Use a built-in list method to sort

  1. In your python file, create the following variables:
    1. Create a list named "animals" with 7 different animals aselements
    2. Use a built-in list method to sort the list "animals" inascending alphabetical order
    3. Use append() to add one more animal to the list "animals"
    4. Create a tuple named "vegetables" with 4 different vegetablesas elements
    5. Create a dictionary named "birthdays" with 5 different key,value pairs. Each key should be a name and each associated valueshould be their birthday.
    6. Write an If Statement to check if the name "John" is a key inyour "birthdays" dictionaries. If True, print "Yes, I know John'sbirthday". If False, print "I do not know John's birthday."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!