Spocoman

Cat Shirt

Jan 7th, 2022 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1. sleeve = float(input())
  2. front = float(input())
  3. fabric = input()
  4. tie = input()
  5.  
  6. sum = (sleeve * 2 + front * 2) * 1.1 / 100
  7.  
  8. if fabric == "Linen":
  9.     sum *= 15
  10. elif fabric == "Cotton":
  11.     sum *= 12
  12. elif fabric == "Denim":
  13.     sum *= 20
  14. elif fabric == "Twill":
  15.     sum *= 16
  16. elif fabric == "Flannel":
  17.     sum *= 11
  18. sum += 10
  19.  
  20. if tie == "Yes":
  21.     sum *= 1.2
  22.  
  23. print(f'The price of the shirt is: {sum:.2f}lv.')
  24.  
  25.  
  26. Тарикатско решение:)
  27.  
  28. sum = 10 + (float(input()) + float(input())) * 0.022 * \
  29.       {"Cotton": 12, "Denim": 20, "Flannel": 11, "Linen": 15, "Twill": 16}[input()]
  30.  
  31. print(f'The price of the shirt is: {sum * 1.2 if input() == "Yes" else sum:.2f}lv.')
  32.  
  33.  
Add Comment
Please, Sign In to add comment