Created
April 9, 2014 19:42
-
-
Save seanjensengrey/d053e7fa709e0699e291 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| t = {} | |
| t[0,0] = lambda x: x | |
| t[1,0] = lambda x: "Fizz" | |
| t[0,1] = lambda x: "Buzz" | |
| t[1,1] = lambda x: "FizzBuzz" | |
| def tests(x): | |
| return (x % 3 == 0, x % 5 == 0) | |
| for x in range(1,101): | |
| print t[tests(x)](x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment