Advertisement
R8za

5.4 - FizzBuzz

Jun 25th, 2022 (edited)
586
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None
  1. #Write your code below this row 👇
  2.  
  3. for i in range(1, 101):
  4.     if i % 3 == 0 and i % 5 == 0:
  5.         print("FizzBuzz")
  6.     elif i % 3 == 0:
  7.         print("Fizz")
  8.     elif i % 5 == 0:
  9.         print("Buzz")
  10.     else:
  11.         print(i)
  12.  
Advertisement
RAW Paste Data Copied
Advertisement