Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2019
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. product = input()
  2. day = input()
  3. quantity = float(input())
  4.  
  5. price = 0
  6.  
  7. if day == 'Monday' \
  8. or day == 'Tuesday' \
  9. or day == 'Wednesday' \
  10. or day == 'Thursday' \
  11. or day == 'Friday':
  12. if product == 'banana':
  13. price = 2.5
  14. elif product == 'apple':
  15. price = 1.2
  16. elif product == 'orange':
  17. price = 0.85
  18. elif product == 'grapefruit':
  19. price = 1.45
  20. elif product == 'kiwi':
  21. price = 2.7
  22. elif product == 'pineapple':
  23. price = 5.50
  24. elif product == 'grapes':
  25. price = 3.85
  26. else:
  27. print('error')
  28.  
  29. elif day == 'Saturday' or day == 'Sunday':
  30. if product == 'banana':
  31. price = 2.7
  32. elif product == 'apple':
  33. price = 1.25
  34. elif product == 'orange':
  35. price = 0.9
  36. elif product == 'grapefruit':
  37. price = 1.60
  38. elif product == 'kiwi':
  39. price = 3
  40. elif product == 'pineapple':
  41. price = 5.60
  42. elif product == 'grapes':
  43. price = 4.20
  44. else:
  45. print('error')
  46.  
  47. total = price * quantity
  48. print(f'{total:.2f}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement