La réalisation d'aujourd'hui.
Python
MAX = 100
i = 1
while i <= MAX:
result = ""
if i % 3 == 0:
result += "fizz"
if i % 5 == 0:
result += "buzz"
if result == "":
result = i
print result
i += 1
Je me suis souvenu de la déclaration for.
Python
MAX = 100
for i in range(1, MAX+1):
result = ""
if i % 3 == 0:
result += "Fizz"
if i % 5 == 0:
result += "Buzz"
if result == "":
result = str(i)
print result