Created
April 16, 2022 16:32
-
-
Save samsonq/c77378b47ca6e9816e3c3cfb0969ea3e to your computer and use it in GitHub Desktop.
Estimating Pi and Area of Circle with Monte Carlo Simulation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import math | |
from matplotlib import pyplot as plt | |
def pi_monte_carlo(num_simulations, radius=1): | |
return ... | |
if __name__ == "__main__": | |
simulations = 10000 | |
print(pi_monte_carlo(10000)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment