Skip to content

Commit 91cdbee

Browse files
python even odd exercise
1 parent 197e53d commit 91cdbee

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

huntober2023/fizzbuzz.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
# 5 = "Buzz"
88

99
def fizz_buzz_printer(num):
10-
for n in range(num):
10+
for n in range(1,num):
1111
if n % 5 == 0 and n % 3 == 0 and n != 0:
1212
print("Fizz Buzz")
1313
elif n % 3 == 0:
1414
print("Fizz")
1515
elif n % 5 == 0:
1616
print("Buzz")
17-
# print(n)
17+
else:
18+
print(n)
1819

1920

2021
print(fizz_buzz_printer(16))

pythonExercises/8kyus/evenOdd.py

Whitespace-only changes.

0 commit comments

Comments
 (0)