Add a Python implementation of the lyrics
Not really relevant, but I had it written, so why not :-)master
parent
66d11e3460
commit
d91b2b942b
@ -0,0 +1,23 @@
|
||||
#!/bin/python3
|
||||
"""A simple script to just print lyrics.
|
||||
|
||||
Mainly for inspiration for the Scheme code."""
|
||||
|
||||
items = ['bog', 'hole', 'seed', 'tree', 'branch', ...]
|
||||
|
||||
last = 'a bog down in the valley, oh.'
|
||||
|
||||
intro = 'And in that {x} there was a {y}, a rare {y} a rattling {y}' # FIXME: in vs on
|
||||
|
||||
chorus = 'Oh row a rattling bog a bog down in the valley oh.\n'*2
|
||||
|
||||
### init
|
||||
|
||||
print(chorus)
|
||||
|
||||
for l in range(1,len(items)):
|
||||
print(intro.format(x=items[l-1], y=items[l]))
|
||||
for i in range(l, 0, -1):
|
||||
print('{x} in the {y}'.format(x=items[i], y=items[i-1]))
|
||||
print(last)
|
||||
print(chorus)
|
Loading…
Reference in New Issue