Happy Pi Day! We are going to bake pie and calculate Pi! (This explanation is long): You are going to throw strawberries randomly at your pie, but some of them will miss. All the strawberries will either land on the pie or on the table. We will calculate pi by estimating the total area of the table by the total number of strawberries you throw. You will estimate the area of the circle by how many of those land on the pie. We will use Pythagoras to see how far the strawberry landed from the middle. If it's less than the radius, it's on the pie! We know the area of the circle is pi*r^2. We also know the length of one side of the square is twice the radius of the circle. So the area of the square is (2r) * (2r) = 4*r^2. So what we can do is say the ratio of the number of strawberries on the pie to the total number of strawberries is the same as the area of the pie to the area of the table. num_on_pie / total_number = pi*r^2 / 4*r^2 The r^2 cancels out and you are left with num_on_pie / total_number = pi / 4 solve for pi: pi = (4 * num_on_pie) / total_number So the more strawberries you throw, the closer you will get to pi! (Scratch has a maximum of 300 clones, but you can take this lesson and expand it to any other programming language!)
Thanks to my 7th-grade math teacher for showing me this method and sparking an even-greater love of math!