DEV Community

loading...

Discussion on: FizzBuzz challenge in as many languages as possible

Collapse
teotcd profile image
JedDevs Author

Language: Python
Code:

def FizzBuzz():
  for i in range (1,101):
    #print(i/3)
    if i%3 == 0 and i%5 == 0:
      print("FizzBuzz")
    elif i%3 == 0:
      print("Fizz")
    elif i%5 == 0:
      print("Buzz")
    else: 
      print(i)
FizzBuzz()