Tuesday, July 10, 2012

Math probability

Me and my Dad made this program for math probability. For those of you who don't like math; don't worry - all you really have to do is watch.

https://dl.dropbox.com/u/18668734/coinflips.py

Dan says for parents: if you have a Mac, download this file and save it to your desktop. Open up the Terminal program in the Utilities folder, and type in "python Desktop/coinflips.py" and press return. This program will ask you "how many trials." This means how many times do you want to flip coins. Type a number (less than a million or it will take a really long time), and press return. It will flip four coins however many times you ask it, and then print out a table showing how many times you get each outcome. What do you think is the most likely outcome? You can do this on Windows too but there are a few more steps.


UPDATED by Dan 7/10/12: Here's a new version of the program you can run right in the blog: Just press Go! You can also change the number of coins being flipped.

How many coins?



How many trials?







No comments:

Post a Comment