Skip to content

Commit b0f9140

Browse files
committed
Merge pull request blakeembrey#163 from faruzzy/master
Added shortest Fizz buzz python solution
2 parents 82b9274 + f0b6b55 commit b0f9140

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)