User Tools

Site Tools


user:jask

jask

jask
name: Jan Škrle
email: j.skrle@gmail.com
phone: +420 728 363 628
web: jask
irc nick: jask
jabber: jask nemá žábry

jask

Puzzle - python code golf

Write valid python code generating whole beer song (shown bellow) using supposedly least possible number of chars (bytes). You are allowed to use only standard library (built-ins) of python interpreter.

I've managed to make my code on 214 bytes of source code on my first attempt before googling about the article. Which is still much more than best results published. Whoever makes less on his first try, can show me and charge me a Mate in lab. Fair play required :)

99 bottles of beer on the wall, 99 bottles of beer.
Take one down and pass it around, 98 bottles of beer on the wall.

... [96 more verses]

2 bottles of beer on the wall, 2 bottles of beer.
Take one down and pass it around, 1 bottle of beer on the wall.

1 bottle of beer on the wall, 1 bottle of beer.
Go to the store and buy some more, 99 bottles of beer on the wall.

(Whole beer song has 99 verses in it's entirety)

user/jask.txt · Last modified: 2015/12/09 17:30 by jask