forked from Daudie87/Beginner-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path99Bottles.py
33 lines (25 loc) · 911 Bytes
/
99Bottles.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
def firstVerse(count, bottleTense):
firstVerse = "%s %s of beer on the wall, %s %s of beer." % (count, bottleTense, count, bottleTense)
print(firstVerse)
def secondVerse(count, bottleTense):
secondVerse = "Take one down and pass it around, %s %s of beer on the wall!\n" % (count, bottleTense)
print(secondVerse)
def lyrics():
count = 99
bottleTense = "bottles"
while count > 1:
firstVerse(count, bottleTense)
count -= 1
if count > 1:
secondVerse(count, bottleTense)
elif count == 1:
bottleTense = "bottle"
secondVerse(count, bottleTense)
firstVerse(count, bottleTense)
count = "no more"
bottleTense = "bottles"
secondVerse(count, bottleTense)
count = "No more"
firstVerse(count, bottleTense)
print("Go to the store and buy some more, 99 bottles of beer on the wall!\n")
lyrics()