Advertisement
AliaksandrLet

FizzBuzz

May 14th, 2022
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.22 KB | None | 0 0
  1. for x in range(1, 100):
  2.     if (x % 15 == 0):
  3.         print("FizzBuzz", end=' ')
  4.     elif x % 3 == 0:
  5.         print("Fizz", end=' ')
  6.     elif x % 5 == 0:
  7.         print("Buzz", end=' ')
  8.     else:
  9.         print(x, end=' ')
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement