Advertisement
Ilikebugs

Fizzbuzz

Aug 4th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. Python :
  2. x=1
  3. while x<=100:
  4.   output = ""
  5.   if x%3 == 0:
  6.     output += "Fizz"
  7.   if x%5 == 0:
  8.     output += "Buzz"
  9.   if output == "":
  10.     output = x
  11.   print output
  12.   x+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement