From d2158a1accbbe19a74711271bdbb5608b37df578 Mon Sep 17 00:00:00 2001 From: xabier <xabier.barrenetxea@tecnalia.com> Date: Thu, 16 Jul 2020 12:03:14 +0200 Subject: [PATCH] Xabi 2 --- fizzbuzz.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fizzbuzz.py b/fizzbuzz.py index 4b28edc..07657f8 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -5,13 +5,12 @@ def fizzbuzz(n:int) -> str: And for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". """ - if 3 % n == 0 and 5 % n == 0: + if n % 3 == 0 and n % 5 == 0: return "FizzBuzz" - elif 3 % n == 0: + elif n % 3 == 0: return "Fizz" - elif 5 % n ==0: + elif n % 5 == 0: return "Buzz" else: return str(n) - -- GitLab