Classic 99 bottles of beer by pyrami

B,O,W,M,S,C,P="bottle","of beer","on the wall","o more","s",",",".\n";Z=B+S\x0d
for i in range(99,0,-1):\x0d
 if i==1:    X="1 "+B\x0d
 else:   X=str(i)+" "+Z\x0d
 if i-1==1:  Y="1 "+B\x0d
 elif i-1==0:    Y="n"+M+" "+Z\x0d
 else:   Y=str(i-1)+" "+Z\x0d
 print X,O,W+C,X,O+P,"Take one down and pass it around,",Y,O,W+P\x0d
print "N"+M,Z,O,W+C,"n"+M,Z,O+P,"Go to the store and buy some more. 99",Z,O,W+"."\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).


return to the top page