Added Approximating pi script and an example script on hot to plot a function using matplotlib.
Approximating pi
This script is useful to show a way to approximate the value of pi using a Monte Carlo method. It is also optimized using the @jit (just-in-time) decorator from the numba library.
To see different approximations you just need to modify the argument passed to the main function.
python pi.py
Plotting a function
This script contains an example of plotting a function using matplotlib. Feel free to modify the value of y to obtain different functions that depend on x.
Added Approximating pi script and an example script on hot to plot a function using matplotlib.
Approximating pi
This script is useful to show a way to approximate the value of pi using a Monte Carlo method. It is also optimized using the
@jit
(just-in-time) decorator from the numba library.To see different approximations you just need to modify the argument passed to the main function.
Plotting a function
This script contains an example of plotting a function using
matplotlib
. Feel free to modify the value ofy
to obtain different functions that depend onx
.