# FizzBuzz problem # Subroutine to output Fizz for multiples of 3 and Buzz for multiples of 5 def FizzBuzz(X): # Loop from 1 to X for Counter in range(1,X + 1): # Multiple of 3 and 5 if Counter % 3 == 0 and Counter % 5 == 0: print("FizzBuzz") # Multiple of 3 only elif Counter % 3 == 0: print("Fizz") # Multiple of 5 only elif Counter % 5 == 0: print("Buzz") # Not multiple of 3 or 5 else: print(Counter) # Main program FizzBuzz(100)