Advertisement
djogleva

Untitled

Jan 29th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. fruit = str(input())
  2. week_day = str(input())
  3. quantity = float(input())
  4.  
  5. price = 0
  6.  
  7. if week_day == 'Monday' or week_day == 'Tuesday' or week_day == 'Wednesday' or week_day == 'Thursday' or week_day == 'Friday' or week_day == 'Saturday' or week_day == 'Sunday':
  8. True
  9. elif fruit == 'banana' or fruit == 'apple' or fruit == 'orange' or fruit == 'grapefruit' or fruit == 'kiwi' or fruit == 'pineapple' or fruit == 'grapes':
  10. True
  11. else:
  12. print("error")
  13.  
  14. if week_day == 'Monday' or week_day == 'Tuesday' or week_day == 'Wednesday' or week_day == 'Thursday' or week_day == 'Friday':
  15. if fruit == 'banana':
  16. price = 2.50
  17. if fruit == 'apple':
  18. price = 1.20
  19. if fruit == 'orange':
  20. price = 0.85
  21. if fruit == 'grapefruit':
  22. price = 1.45
  23. if fruit == 'kiwi':
  24. price = 2.70
  25. if fruit == 'pineapple':
  26. price = 5.50
  27. if fruit == 'grapes':
  28. price = 3.85
  29.  
  30. if week_day == 'Saturday' or week_day == 'Sunday':
  31. if fruit == 'banana':
  32. price = 2.70
  33. if fruit == 'apple':
  34. price = 1.25
  35. if fruit == 'orange':
  36. price = 0.90
  37. if fruit == 'grapefruit':
  38. price = 1.60
  39. if fruit == 'kiwi':
  40. price = 3.00
  41. if fruit == 'pineapple':
  42. price = 5.60
  43. if fruit == 'grapes':
  44. price = 4.20
  45.  
  46.  
  47. total_amount = price * quantity
  48. print(total_amount)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement