Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

please write in python , thank u.

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

### Part One - If Logic

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

### Part Two - Using Range

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

### Part Three - Looping Through Dictionary Items

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

b. 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  
```
expand button
Transcribed Image Text:**All print output should include descriptions as shown in the example output below.** ### Part One - If Logic a. Create a list called `scifi` that contains the elements: Alien, Solaris, Inception, Moon. b. Create a list called `comedy` that contains the elements: Borat, Idiocracy, Superbad, Bridesmaids. c. Ask the user for the name of a movie. d. Using if/elif/else, determine and print the genre of the movie. e. Test three times: first with Moon, then Superbad, then Dunkirk. ### Part Two - Using Range a. Use a for loop to print the even integers in descending order from 10 to 0 inclusive. ### Part Three - Looping Through Dictionary Items a. 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 b. 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 ```
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education