CIS 41A Unit E, Exercise E

This assignment consists of one script with three parts.

At the top of your script, put the following multi-line comment with your information:

'''
Your name as registered, with optional nickname in parentheses
CIS 41A   Fall 2021
Unit E, Exercise E
'''

All print output should include descriptions as shown in the example output below.

Part One - If Logic

  1. Create a list called scifi that contains the elements Alien, Solaris, Inception, Moon.
  2. Create a list called comedy that contains the elements Borat, Idiocracy, Superbad, Bridesmaids.
  3. Ask the user for the name of a movie.
  4. Using if/elif/else, determine and print the genre of the movie.
  5. Test three times: first with Moon, then Superbad, then Dunkirk.

Part Two - Using Range

  1. Use a for loop to print the even integers in descending order from 10 to 0 inclusive.

Part Three - Looping Through Dictionary Items

  1. Create a dictionary named movies and populate it with these key value pairs:
    The Wizard of Oz:1939
    The Godfather:1972
    Lawrence of Arabia:1962
    Raging Bull:1980
  2. Loop through the dictionary items and print the year in which each movie was made. Output should be alpha sorted by movie title.

Sample Execution Results:

Please enter a movie title: Moon
Moon is a scifi movie.
Please enter a movie title: Superbad
Superbad is a comedy movie.
Please enter a movie title: Dunkirk
Sorry, I don't know what kind of movie Dunkirk is.

10
8
6
4
2
0

Lawrence of Arabia was made in 1962
Raging Bull was made in 1980
The Godfather was made in 1972
The Wizard of Oz was made in 1939

Add the following at the end of the script to show your results:

'''
Execution results:
paste execution results here
'''

Submit your finished py script in Canvas, Exercise E.