Skip to content

Function issue fixed #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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