Logan1x / Python-Scripts

Collection of Various Python Script's.💻
https://logan1x.github.io/Python-Scripts/
MIT License
306 stars 147 forks source link

HACKTOBERFEST: Approximation of pi and plotting example #11

Closed RodolfoFerro closed 7 years ago

RodolfoFerro commented 7 years ago

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.

python plot_example.py
RodolfoFerro commented 7 years ago

Hey @Logan1x , I'll begin with some PRs uploading scripts. 😃 👍

Logan1x commented 7 years ago

Thanks @RodolfoFerro For help :)