fin

parent d1918a60
{ # Calcul de Pi
"cells": [],
"metadata": { from math import
"kernelspec": { * print(pi)
"display_name": "Python 3",
"language": "python", import numpy as np
"name": "python3" np.random.seed(seed=42)
}, N = 10000
"language_info": { x = np.random.uniform(size=N, low=0, high=1)
"codemirror_mode": { theta = np.random.uniform(size=N, low=0, high=pi/2)
"name": "ipython", 2/(sum((x+np.sin(theta))>1)/N)
"version": 3
}, %matplotlib inline
"file_extension": ".py", import matplotlib.pyplot as plt
"mimetype": "text/x-python", np.random.seed(seed=42)
"name": "python", N = 1000
"nbconvert_exporter": "python", x = np.random.uniform(size=N, low=0, high=1)
"pygments_lexer": "ipython3", y = np.random.uniform(size=N, low=0, high=1)
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment