Created
September 16, 2011 17:35
-
-
Save seabre/1222638 to your computer and use it in GitHub Desktop.
Extremely Obnoxious FizzBuzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Originally from: http://codepad.org/9Gl9VQ0u | |
#Extremely obnoxious Python solution to FizzBuzz | |
#http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html | |
import sys | |
map(lambda i: sys.stdout.write("FizzBuzz\n") if i%15==0 else (sys.stdout.write("Fizz\n") if i%3==0 else (sys.stdout.write("Buzz\n") if i%5==0 else sys.stdout.write(str(i)+"\n"))), range(1,101)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment