Skip to content

Instantly share code, notes, and snippets.

@Norgg
Last active December 17, 2015 13:19
Show Gist options
  • Save Norgg/5616378 to your computer and use it in GitHub Desktop.
Save Norgg/5616378 to your computer and use it in GitHub Desktop.
FizzBuzz in python and ruby
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