hat the program will be asking him/her to enter his/her 3 favorite movies. o where the prompt changes as indicated below. ntered should be added to a growing list. has been gone through 3 times, print the contents of the list was accumulated che text "Your favorite movies are". Il prompts and format of output messages. e asked to enter your three favorite movies fe is Beautiful en Harry met Sally Cousin Vinnie ite movies are ['Life is Beautiful', 'When Harry met Sally', 'My Cousin Vinnie'] hard-coded for 3 movies. Write you program so that it could be easily expanded to prompt the user value N, and then ask the user for those N movies. th an empty list ch movie item to the growing list y changing the prompt is a small wrinkle. It could be accomplished with concatenation conversion function. Note: str(25) produces "25"

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
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"
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
MacOS
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education