madfedora

[ Python FizzBuzz ]

Jul 15th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #!/usr/bin/env python
  2. for z in range(1, 101):
  3.     if not(z % 3 or z % 5):
  4.         print 'FizzBuzz'
  5.     elif not z % 3:
  6.         print 'Fizz'
  7.     elif not z % 5:
  8.         print 'Buzz'
  9.     else:
  10.         print z
Advertisement
Add Comment
Please, Sign In to add comment