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

bartleby

Concept explainers

Question
Follow instructions
Tell the user that the program will be asking him/her to enter his/her 3 favorite movies.
Use a for-loop where the prompt changes as indicated below.
Each movie entered should be added to a growing list.
After the loop has been gone through 3 times, print the contents of the list was accumulated
preceded by the text "Your favorite movies are".
Reproduce all prompts and format of output messages.
A sample run:
You will be asked to enter your three favorite movies
Moviel? Life is Beautiful
Movie2? When Harry met Sally
Movie3? My Cousin Vinnie
Your favorite movies are
['Life is Beautiful', 'When Harry met Sally', 'My Cousin Vinnie']
Though this is hard-coded for 3 movies. Write you program so that it could be easily expanded to prompt the user
for an integer value N, and then ask the user for those N movies.
Hints:
1. Start out with an empty list
2. append each movie item to the growing list
3. Dynamically changing the prompt is a small wrinkle. It could be accomplished with concatenation
and the "str" conversion function. Note: str(25) produces "25"
expand button
Transcribed Image Text:Tell the user that the program will be asking him/her to enter his/her 3 favorite movies. Use a for-loop where the prompt changes as indicated below. Each movie entered should be added to a growing list. After the loop has been gone through 3 times, print the contents of the list was accumulated preceded by the text "Your favorite movies are". Reproduce all prompts and format of output messages. A sample run: You will be asked to enter your three favorite movies Moviel? Life is Beautiful Movie2? When Harry met Sally Movie3? My Cousin Vinnie Your favorite movies are ['Life is Beautiful', 'When Harry met Sally', 'My Cousin Vinnie'] Though this is hard-coded for 3 movies. Write you program so that it could be easily expanded to prompt the user for an integer value N, and then ask the user for those N movies. Hints: 1. Start out with an empty list 2. append each movie item to the growing list 3. Dynamically changing the prompt is a small wrinkle. It could be accomplished with concatenation and the "str" conversion function. Note: str(25) produces "25"
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