mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
16 lines
251 B
Python
16 lines
251 B
Python
def fizzbuzz(n):
|
|
if n % 3 == 0 and n % 5 == 0:
|
|
return "FizzBuzz"
|
|
elif n % 3 == 0:
|
|
return "Fizz"
|
|
elif n % 5 == 0:
|
|
return "Buzz"
|
|
else:
|
|
return str(n)
|
|
|
|
|
|
n = 1
|
|
while n < 10:
|
|
print(fizzbuzz(n))
|
|
n += 1
|