FizzBuzz

Report a typo

FizzBuzz is a famous code challenge used in interviews to test basic programming skills. It's time to write your own implementation.

Print numbers from 1 to 100 inclusively following these instructions:

  • if a number is multiple of 3, print "Fizz" instead of this number
  • if a number is multiple of 5, print "Buzz" instead of this number
  • for numbers that are multiples of both 3 and 5, print "FizzBuzz"
  • print the rest of the numbers unchanged.

Output each value on a separate line.

Write a program in Python 3





___

Create a free account to access the full topic