Staging
v0.5.1
https://github.com/python/cpython
Revision f226f408647044e531112ad16e95dba966d90970 authored by Anthony Baxter on 10 January 2002, 11:12:20 UTC, committed by Anthony Baxter on 10 January 2002, 11:12:20 UTC
sent with empty message.

sheesh. Lucky I decided it was worth doing last minute complete compile
tests. cvs merge stupid on my part fixed that made solaris builds totally
fail.
1 parent ca1512c
Raw File
Tip revision: f226f408647044e531112ad16e95dba966d90970 authored by Anthony Baxter on 10 January 2002, 11:12:20 UTC
cosmetic change to add a commit message for the last commit, accidently
Tip revision: f226f40
beer.py
#! /usr/bin/env python
# By GvR, demystified after a version by Fredrik Lundh.
import sys
n = 100
if sys.argv[1:]: n = int(sys.argv[1])
def bottle(n):
    if n == 0: return "no more bottles of beer"
    if n == 1: return "one bottle of beer"
    return str(n) + " bottles of beer"
for i in range(n):
    print bottle(n-i), "on the wall,"
    print bottle(n-i) + "."
    print "Take one down, pass it around,"
    print bottle(n-i-1), "on the wall."
back to top