Skip to content

Conversation

@RodolfoFerro
Copy link
Contributor

@RodolfoFerro RodolfoFerro commented Oct 4, 2017

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 RodolfoFerro changed the title @RodolfoFerro: Approximation of pi and plotting example Approximation of pi and plotting example Oct 4, 2017
@RodolfoFerro
Copy link
Contributor Author

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

@Logan1x Logan1x merged commit 0d2542d into Logan1x:master Oct 5, 2017
@Logan1x
Copy link
Owner

Logan1x commented Oct 5, 2017

Thanks @RodolfoFerro For help :)

@RodolfoFerro RodolfoFerro changed the title Approximation of pi and plotting example HACKTOBERFEST: Approximation of pi and plotting example Oct 6, 2017
@RodolfoFerro RodolfoFerro mentioned this pull request Oct 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants