Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions 11_challenge/11_challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ def fizzbuzz(max_num):
# Google for 'range in python' to see what it does
for i in range(1,max_num):
# % or modulo division gives you the remainder
if i%3==0:
if (i%3==0 and i%5==0):
print(i,"fizzbuzz")
elif (i%3==0):
print(i,"fizz")
elif i%5==0:
elif (i%5==0):
print(i,"Buzz")
elif i%3==0 and i%5==0:
print(i,"fizzbuzz")


#----START OF SCRIPT
if __name__=='__main__':
Expand Down