# ex07000_module_math.py # Teste le module "math" from math import * print(sin(90)) print(sqrt(25), sqrt(2)) # La fonction sqrt calcule la racine carrée approx_e = 2 + 1/2 + 1/(2*3) + 1/(2*3*4) + 1/(2*3*4*5) + 1/(2*3*4*5*6) print(approx_e, " ~=", e) print("Erreur relative =", (approx_e - e) / e) approx_pi = 355 / 113 print(approx_pi, " ~=", pi) print("Erreur relative =", (approx_pi - pi) / pi)