ça te permettra de voir les erreurs directement
- Code: Tout sélectionner
import math
a = 0
b = math.pi
while b - a > 0.001:
x = (a + b) / 2
if math.sin(x) > x / 2:
a = x
else:
b = x
print("a = {}, b = {}".format(a, b))
import math
a = 0
b = math.pi
while b - a > 0.001:
x = (a + b) / 2
if math.sin(x) > x / 2:
a = x
else:
b = x
print("a = {}, b = {}".format(a, b))
Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 1 invité
Tu pars déja ?
Identification
Pas encore inscrit ?
Ou identifiez-vous :