summaryrefslogtreecommitdiffstats
path: root/Tools/demo/beer.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-10-03 15:09:02 (GMT)
committerGitHub <noreply@github.com>2022-10-03 15:09:02 (GMT)
commit64fe34371722d90448e0d1a0c04e7ed106f5f70a (patch)
tree3469166def39cfc26dfdce75062fddd5ab0d1d98 /Tools/demo/beer.py
parente6f9ec5c031bd996fcd5f463c407beef0b743b49 (diff)
downloadcpython-64fe34371722d90448e0d1a0c04e7ed106f5f70a.zip
cpython-64fe34371722d90448e0d1a0c04e7ed106f5f70a.tar.gz
cpython-64fe34371722d90448e0d1a0c04e7ed106f5f70a.tar.bz2
gh-97681: Remove Tools/demo/ directory (#97682)
Remove the Tools/demo/ directory which contained old demo scripts. A copy can be found in the old-demos project: https://github.com/gvanrossum/old-demos Remove the following old demo scripts: * beer.py * eiffel.py * hanoi.py * life.py * markov.py * mcast.py * queens.py * redemo.py * rpython.py * rpythond.py * sortvisu.py * spreadsheet.py * vector.py Changes: * Remove a reference to the redemo.py script in the regex howto documentation. * Remove a reference to the removed Tools/demo/ directory in the curses documentation. * Update PC/layout/ to remove the reference to Tools/demo/ directory.
Diffstat (limited to 'Tools/demo/beer.py')
-rwxr-xr-xTools/demo/beer.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/Tools/demo/beer.py b/Tools/demo/beer.py
deleted file mode 100755
index af58380..0000000
--- a/Tools/demo/beer.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python3
-
-"""
-A Python version of the classic "bottles of beer on the wall" programming
-example.
-
-By Guido van Rossum, 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, 0, -1):
- print(bottle(i), "on the wall,")
- print(bottle(i) + ".")
- print("Take one down, pass it around,")
- print(bottle(i-1), "on the wall.")