'Mastering the FizzBuzz Challenge with Python'

preview_player
Показать описание
In this video, you will learn how to solve the popular FizzBuzz challenge using Python programming language. The challenge involves printing numbers from 1 to 100, but replacing multiples of 3 with "Fizz", multiples of 5 with "Buzz", and multiples of both with "FizzBuzz".
Рекомендации по теме
Комментарии
Автор

Precise and blunt. good music by the way

tigreonice
Автор

for i in range(1, 101):
if i % 3 == 0 and i % 5 == 0:
print(f"{i} FizzBuzz")
elif i % 3 == 0:
print(f"{i} Fizz")
elif i % 5 == 0:
print(f"{i} Buzz")
else:
print(i)

MagnsCrLsn
Автор

can you write the number and the key word too? it will be conefusing when some random number than buzz! pls rewrite this code.

MagnsCrLsn