Advertisement
Peaser

fizzubzz

Jun 24th, 2015
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. for i in range(1, 101):
  2.   if (i % 3 == 0):
  3.     print "FizzBuzz" if (i % 5 == 0) else "Fizz"
  4.   else:
  5.     print "Buzz" if (i % 5 == 0) else i
  6.  
  7.  
  8. for i in range(1,101):
  9.   if not(i%3):
  10.     print"FizzBuzz"if not(i%5)else"Fizz"
  11.   else:
  12.     print"Buzz"if not(i%5)else i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement