97.4k views
3 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 this number to simulate the weather in the video game.,

User Markedup
by
4.9k points

1 Answer

5 votes

Answer:

I would divide 50 by 4 (Because there are usually 4 weather conditions in game) and whichever the number is closest to it would pick that weather condition

User Rebra
by
5.6k points