Advertisement
biswasrohit20

all

Mar 18th, 2021
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1.  
  2. # bronze
  3. num = int(input("How many bottles to start with?\n"))
  4. number = num
  5. for i in range(num):
  6. print(str(number)+' green bottles, hanging on the wall')
  7. print(str(number)+' green bottles hanging on the wall')
  8. print('and if one green bottle, should accidentally fall')
  9. number = number - 1
  10. print('there\'d be '+str(number)+' green bottles, hanging on the wall')
  11. print()
  12.  
  13. # silver
  14.  
  15. num = int(input("How many bottles to start with?\n"))
  16. number = num
  17. for i in range(num):
  18. if number == 1:
  19. print(str(number)+' green bottle, hanging on the wall')
  20. print(str(number)+' green bottle hanging on the wall')
  21. else:
  22. print(str(number)+' green bottles, hanging on the wall')
  23. print(str(number)+' green bottles hanging on the wall')
  24.  
  25. print('and if one green bottle, should accidentally fall')
  26.  
  27. number = number - 1
  28. if number == 0:
  29. number = "no"
  30. if number == 1:
  31. print(f'there\'d be '+str(number)+' green bottle, hanging on the wall')
  32. else:
  33. print(f'there\'d be '+str(number)+' green bottles, hanging on the wall')
  34. print()
  35.  
  36.  
  37. # gold
  38.  
  39. num = int(input("How many bottles to start with?\n"))
  40. number = num
  41. words = ["no", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"]
  42. for i in range(num):
  43. if number == 1:
  44. print(words[number]+' green bottle, hanging on the wall')
  45. print(words[number]+' green bottle hanging on the wall')
  46. else:
  47. print(words[number]+' green bottles, hanging on the wall')
  48. print(words[number]+' green bottles hanging on the wall')
  49.  
  50. print('and if one green bottle, should accidentally fall')
  51.  
  52. number = number - 1
  53. if number == 1:
  54. print('there\'d be ' + words[number] + ' green bottle, hanging on the wall')
  55. else:
  56. print('there\'d be ' + words[number] + ' green bottles, hanging on the wall')
  57. print()
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement