Advertisement
biswasrohit20

song

Mar 18th, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 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(f'{number} green bottles, hanging on the wall')
  7. print(f'{number} green bottles hanging on the wall')
  8. print(f'and if one green bottle, should accidentally fall')
  9. number = number - 1
  10. print(f'there\'d be {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(f'{number} green bottle, hanging on the wall')
  20. print(f'{number} green bottle hanging on the wall')
  21. else:
  22. print(f'{number} green bottles, hanging on the wall')
  23. print(f'{number} green bottles hanging on the wall')
  24.  
  25. print(f'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 {number} green bottle, hanging on the wall')
  32. else:
  33. print(f'there\'d be {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(f'{words[number]} green bottle, hanging on the wall')
  45. print(f'{words[number]} green bottle hanging on the wall')
  46. else:
  47. print(f'{words[number]} green bottles, hanging on the wall')
  48. print(f'{words[number]} green bottles hanging on the wall')
  49.  
  50. print(f'and if one green bottle, should accidentally fall')
  51.  
  52. number = number - 1
  53. if number == 1:
  54. print(f'there\'d be {words[number]} green bottle, hanging on the wall')
  55. else:
  56. print(f'there\'d be {words[number]} green bottles, hanging on the wall')
  57. print()
  58.  
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement