Last active
December 17, 2015 13:19
-
-
Save Norgg/5616378 to your computer and use it in GitHub Desktop.
FizzBuzz in python and ruby
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
def end():pass; end | |
def p(s):pass;print(s); end | |
def out(s):pass; p(s); [] and p("\n"); end | |
def fizz(i):pass; fizzbuzz(i); i<100 and fizz(i+1); end | |
def fizzbuzz(i):pass; i % 15 == 0 and out("FizzBuzz"); i % 15 > 0 and i % 3 == 0 and out("Fizz"); i % 15 > 0 and i % 5 == 0 and out("Buzz"); i % 3 > 0 and i % 5 > 0 and out(i); end | |
fizz(1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment