Question: Please answer all 4 parts! 4. (2 pts) Use only the Python random function randrange to solve each of the following tasks Do not use
4. (2 pts) Use only the Python random function randrange to solve each of the following tasks Do not use any other random number functions in your solutions. You may assume random is imported. (a) Write a Python function spinl that returns an integer and simulates the wheel spinner from the Milton Bradley game of Life. The wheel contains the numbers from 1 to 10. def spinl): (b) Write a Python function spin2 ) that returns an integer and simulates the Showcase Showdown wheel from The Price Is Right game show. The wheel contains the multiples of 5 from 5 to 100. Inclusive. def spin2): i 0 (c) Write a Python function roll1 () that returns an integer and simulates a backgammon doubling cube. The 6-sided cube contains the values 2, 4, 8, 16, 32, and 64. def rol11): (d) Write a Python function ro112 that returns a string and simulates a poker die. The 6- sided cube contains the values "A", "K", "Ol", "J", "10" and "9". (You should simulate just one die.) def rol12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
