CALCULATING AND STORING RESULTS This project flips 4 coins 999x999 times. There are a total of 5 possible outcomes for each roll of 4 coins. 0 tails, 1 tail, 2 tails, 3 tail, 4 tails The number 1 is then added to one of 5 rows in a list, depending on the outcome. Example: outcome is 0 tails; the item of the list that represents 0 tails is increased by 1. ___________________________________________ DRAWING RESULTS Every 999 calculations each item of the list is divided by 1,500 (to calculate the number of pixels to move.) The sprite responsible for drawing the graph then starts at the bottom of the screen, and moves up the number of pixels that were calculated above. ___________________________________________
I started on this project to help speed up coin tosses for my maths. However, I wasn't sure that the results were accurate, so I made up some code to store the results. After that, I thought it would be fun add a graph. My conclusion is that while it may appear that scratch does not do a good job picking random numbers accurately, it actually does a perfect job, and can be relied upon to make fair calculations for you. This project can be expanded for dice rolling, and any other kind of picking random numbers. Feel free to remix, and add upon my work.