Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Please answer all 4 parts! image text in transcribed
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

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

Step: 3

blur-text-image

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

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

More Books

Students also viewed these Databases questions

Question

2 What are the steps that can aid effective communication?

Answered: 1 week ago