Skip to content

Commit 7edcdfd

Browse files
committed
Added shortest Fizz buzz python solution
1 parent 6882f10 commit 7edcdfd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
def shortest_fizz_buz():
2+
for i in xrange(0, 100):
3+
s = ''
4+
ss = False
5+
if ((i + 1) % 3 == 0):
6+
s +='Fizz'
7+
if ((i + 1) % 5 == 0):
8+
s +='Buzz'
9+
if ((i + 1) % 3 > 0 and (i + 1) % 5 > 0):
10+
print(i + 1)
11+
else:
12+
print(s)

0 commit comments

Comments
 (0)