Assume you have a black box that gives out a monkey every 10 sec, the height of the monkey is between 24 and 36 inches. The height of the monkeys generated over half n hour follows a normal distribution with mean 30.5 inches and standard deviation 2.5. While there is another box in the room that causes a monkey to vanish if it’s height is below 28 inches, this happens every 20 secs. Write a program to calculate the number of monkeys left in the room after n-days (n is a user input). For the sake of logic assume room is large enough to accommodate an infinite number of monkeys and they have food.
I know how to generate random numbers within a range but not by following fixed mean and standard deviation.
Aucun commentaire:
Enregistrer un commentaire