From 572e57fcf47ff78e1d4548016e9879ebb43bc3ea Mon Sep 17 00:00:00 2001 From: PreedhiVivek Date: Fri, 20 Sep 2019 11:44:34 +0530 Subject: [PATCH] Function issue fixed --- 11_challenge/11_challenge.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/11_challenge/11_challenge.py b/11_challenge/11_challenge.py index 123d406..c9edcb3 100644 --- a/11_challenge/11_challenge.py +++ b/11_challenge/11_challenge.py @@ -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__':