Bonsoir,
1)
def termes(n):
u = 1
print("u(0) = 1")
for i in range(1, n):
u = 1.2 * u + 1
print("u({}) = {}".format(i, round(u, 3)))
Résultat:
u(0) = 1
u(1) = 2.2
u(2) = 3.64
u(3) = 5.368
u(4) = 7.442
u(5) = 9.93
u(6) = 12.916
u(7) = 16.499
u(8) = 20.799
u(9) = 25.959
2)
def seuil(V):
p = 0
while u <= V:
p += 1
print(p)
Résultat: 16
Bonne soirée.
Copyright © 2024 ELIBRARY.TIPS - All rights reserved.
Lista de comentários
Bonsoir,
1)
def termes(n):
u = 1
print("u(0) = 1")
for i in range(1, n):
u = 1.2 * u + 1
print("u({}) = {}".format(i, round(u, 3)))
Résultat:
u(0) = 1
u(1) = 2.2
u(2) = 3.64
u(3) = 5.368
u(4) = 7.442
u(5) = 9.93
u(6) = 12.916
u(7) = 16.499
u(8) = 20.799
u(9) = 25.959
2)
def seuil(V):
p = 0
u = 1
while u <= V:
u = 1.2 * u + 1
p += 1
print(p)
Résultat: 16
Bonne soirée.