Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7 Submit a Python 3 function called random() that generates a random number between 0 and 10. 1) Your script may not import libraries designed

7

Submit a Python 3 function called random() that generates a random number between 0 and 10.

1) Your script may not import libraries designed to generate random numbers (e.g. random.randint)

2) Your script may import other standard Python libraries (sys, time, etc.)

3) It does not have to be statistically perfect, but if run 200 times, it should include every single number at least once

Don't stress too much on this one. We're going to be talking about random numbers in the coming week, so the point is really just to get you thinking about how you would actually generate it. When working on your function, ask yourself the following: is my function predictable with more knowledge? Can I manipulate the environment to generate a number I want? What does it mean when I say this function is random? You don't need to respond to those, but you'll get more out of this if you think about them!

image text in transcribed

Submit a Python 3 function called random() that generates a random number between 0 and 10. 1) Your script may not import libraries designed to generate random numbers (e.g. random.randint) 2) Your script may import other standard Python libraries (sys, time, etc.) 3) It does not have to be statistically perfect, but if run 200 times, it should include every single number at least once Don't stress too much on this one. We're going to be talking about random numbers in the coming week, so the point is really just to get you thinking about how you would actually generate it. When working on your function, ask yourself the following: is my function predictable with more knowledge? Can I manipulate the environment to generate a number I want? What does it mean when I say this function is random? You don't need to respond to those, but you'll get more out of this if you think about them

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

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

More Books

Students also viewed these Databases questions