Question: Write a function that takes in a list of values. The function should returned a randomly selected value from the list. Using the same code,

Write a function that takes in a list of values. The function should returned a randomly selected value from the list.

Using the same code, as a starting point, write a script that selects 3 random items from a list. The three items must be guarenteed to be different from eachother. NOTE: If there are duplicate items in the list, the item may appear in the output more than once.

Python

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem well break it down into two parts First we will write a function that selects a single random value from a list Then well extend ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!