Write a python program that keeps getting random integers from a user-given range until the mean of all numbers gotten s
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Write a python program that keeps getting random integers from a user-given range until the mean of all numbers gotten s
Write a python program that keeps getting random integers from auser-given range until the mean of all numbers gotten so far iswithin a given epsilon of the midpoint of the range and thenreturns the count of random numbers that were necessary toget.>>> low: -100>>> high: 50>>> epsilon: 0.01405 random numbers before the mean was within 0.01 of -25.0