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

Function if_buzz

06_pattern_matching/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 if_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 def fizz_buzz(x):
14 match x % 3, x % 5:

Callers

nothing calls this directly

Calls 1

printFunction · 0.50

Tested by

no test coverage detected