Answered step by step
Verified Expert Solution
Question
1 Approved Answer
By using a random number generator in Python in the range -1 -> +1 Answer the following: Does the number 0.0 ever occur? What is
By using a random number generator in Python in the range -1 -> +1 Answer the following: Does the number 0.0 ever occur? What is the smallest difference between two random numbers? Does the random number generator ever produce a number a second time?
By using the random number generator in Python (random) in the range -1 1. Please answer as best you can (and you may need to generate a lot of random number to do so ) the following questions: a) Does the number 0.0 ever occur? b) What is the smallest difference between two random numbers and using that information can you work out how many "bits" are being used to represent it (Hint: log2(r) give the approximate number of bits in a number and the minimum difference tells you something about the resolution of the generator) c) Does the random number generator ever produce a number a second time?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started