Skip to content

Commit 2874fdd

Browse files
committed
Level 08: zwei fizzbuzz
1 parent 8f51146 commit 2874fdd

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def fizz_buzz(number: int) -> str:
2+
output = ""
3+
if number % 3 == 0:
4+
output += "fizz"
5+
if number % 5 == 0:
6+
output += "buzz"
7+
return output or str(number)
8+
9+
for val in map(fizz_buzz, range(1, 16)):
10+
print(val)

0 commit comments

Comments
 (0)