Skip to content

Commit 567c75a

Browse files
authored
Fizz Buzz
Just a Fizz Buzz program... as simple as possible
1 parent 22bb9b3 commit 567c75a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

fizzbuzz.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
for num in range(1, 101):
2+
string = ""
3+
if num % 3 == 0:
4+
string = string + "Fizz"
5+
if num % 5 == 0:
6+
string = string + "Buzz"
7+
if num % 5 !=0 and num % 3 != 0:
8+
string = string + str(num)
9+
print(string)

0 commit comments

Comments
 (0)