55.6k views
4 votes
In a video game, the chance of rain each day is always 30%. At the beginning of each day in the video game, the computer generates a random integer between 1 and 50. Explain how you could use the number to simulate the weather in the video game

1 Answer

3 votes

Answer:

If the integer is in the range 1–15, then the weather could be declared rainy

Explanation:

Assuming the integers are uniformly distributed 15 of them will constitute 30% of the possible integer. If the integer is in the range 1–15, then the weather could be declared rainy. That would make the probability of rain 30%, as required.

User Marquezz
by
5.2k points