MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / fizz_buzz

Function fizz_buzz

05_functions/python/fizzbuzz.py:3–11  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

1if __name__ == "__main__":
2 # not possible as lambda
3 def fizz_buzz(x):
4 if x % 15 == 0:
5 print("FizzBuzz")
6 elif x % 3 == 0:
7 print("Fizz")
8 elif x % 5 == 0:
9 print("Buzz")
10 else:
11 print(x)
12
13 for i in range(1, 16):
14 fizz_buzz(i)

Callers 2

fizzbuzz.pyFile · 0.70
mainFunction · 0.50

Calls 1

printFunction · 0.50

Tested by

no test coverage detected