This equation is probably somewhat familiar to most people who have studied a bit of calculus: . Today we are breaking it down and converting it to code to really see how this works, when the math notation has been stripped off.
If you have browsed a forum where math is discussed, it is likely you have seen people claiming both that and . Today I will show you that the first one is correct using geometric sums. You don’t need to take my word for it, you will be able to prove it yourself.
The Monty Hall problem is a quiet famous problem where most people’s intuition are wrong. There are many variations of it but I will use one with playing card. It goes like this:
This is a gravity simulator I have written in python using the library VPython/Glowscript. This project was inspired by an exercise my math teacher gave us where we were supposed to simulate the moon’s orbit around the earth in excel using differential equations.