diff --git a/fizzbuzz.py b/fizzbuzz.py new file mode 100644 index 0000000..99c1096 --- /dev/null +++ b/fizzbuzz.py @@ -0,0 +1,15 @@ +# FizzBuzz: Return Fizz for multiples of 3 and Buzz for multiples of 2. + +def fizzBuzz(max=100): + for n in range(1, max): + print(n) + if n % 3 == 0 and n % 2 == 0: + print('FizzBuzz') + continue + elif n % 3 == 0: + print('Fizz') + continue + elif n % 2 == 0: + print('Buzz') + +fizzBuzz()