Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # bronze
- num = int(input("How many bottles to start with?\n"))
- number = num
- for i in range(num):
- print(str(number)+' green bottles, hanging on the wall')
- print(str(number)+' green bottles hanging on the wall')
- print('and if one green bottle, should accidentally fall')
- number = number - 1
- print('there\'d be '+str(number)+' green bottles, hanging on the wall')
- print()
- # silver
- num = int(input("How many bottles to start with?\n"))
- number = num
- for i in range(num):
- if number == 1:
- print(str(number)+' green bottle, hanging on the wall')
- print(str(number)+' green bottle hanging on the wall')
- else:
- print(str(number)+' green bottles, hanging on the wall')
- print(str(number)+' green bottles hanging on the wall')
- print('and if one green bottle, should accidentally fall')
- number = number - 1
- if number == 0:
- number = "no"
- if number == 1:
- print(f'there\'d be '+str(number)+' green bottle, hanging on the wall')
- else:
- print(f'there\'d be '+str(number)+' green bottles, hanging on the wall')
- print()
- # gold
- num = int(input("How many bottles to start with?\n"))
- number = num
- words = ["no", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]
- for i in range(num):
- if number == 1:
- print(words[number]+' green bottle, hanging on the wall')
- print(words[number]+' green bottle hanging on the wall')
- else:
- print(words[number]+' green bottles, hanging on the wall')
- print(words[number]+' green bottles hanging on the wall')
- print('and if one green bottle, should accidentally fall')
- number = number - 1
- if number == 1:
- print('there\'d be ' + words[number] + ' green bottle, hanging on the wall')
- else:
- print('there\'d be ' + words[number] + ' green bottles, hanging on the wall')
- print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement