Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make the program in Python: Create a function that takes a list of words and creates a string by combining three random words from that

Make the program in Python: Create a function that takes a list of words and creates a string by combining three random words from that list. (hint: the module random has a function in it called choice that selects a random element from a list) Have your program ask for a list of words from the user, then a number of movies theyd like to generate. Create the indicated number of movie titles by calling your function on the list of words the user gave you.

Display your results to the user.

Sample Output:

Please enter a list of words: ["Hello", "Dog", "Paper", "Mouse"]

Please enter a number of movies you'd like to generate: 3

Output:

Welcome to Randoplex! Currently playing movies are:

Paper Hello Dog

Mouse Hello Paper

Hello Paper Dog

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions