diff --git a/fizzbuzz.py b/fizzbuzz.py index 8f45358c63b4802cae8a7fc827d0ea12c466a5bb..4c676b857d7f3b70bbb748884b7aae56a765d440 100644 --- a/fizzbuzz.py +++ b/fizzbuzz.py @@ -5,5 +5,13 @@ 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". """ + for i in range(1,101): + if i%3==0 and not i%5==0: + print "Fizz" + if i%5 and not i%3==0: + print "Buzz" + if i%3==0 and i%5==0: + print "FizzBuzz" + return ""