Teo_Yanchev

mobile_operator_2-3-may-2019_exam

Jul 15th, 2020
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. contract = input()
  2. contract_type = input()
  3. internet = input()
  4. months_to_pay = int(input())
  5.  
  6. price = 0
  7.  
  8. if contract == "one":
  9. if contract_type == "Small":
  10. if internet == "yes":
  11. price = 9.98 + 5.50
  12. price *= months_to_pay
  13. else:
  14. price = months_to_pay * 9.98
  15. elif contract_type == "Middle":
  16. if internet == "yes":
  17. price = 18.99 + 4.35
  18. price *= months_to_pay
  19. else:
  20. price = months_to_pay * 18.99
  21. elif contract_type == "Large":
  22. if internet == "yes":
  23. price = 25.98 + 4.35
  24. price *= months_to_pay
  25. else:
  26. price = months_to_pay * 25.98
  27. else:
  28. if internet == "yes":
  29. price = 35.99 + 3.85
  30. price *= months_to_pay
  31. else:
  32. price = months_to_pay * 35.99
  33. elif contract == "two":
  34. if contract_type == "Small":
  35. if internet == "yes":
  36. price = 8.58 + 5.50
  37. price *= months_to_pay
  38. else:
  39. price = months_to_pay * 8.58
  40. elif contract_type == "Middle":
  41. if internet == "yes":
  42. price = 17.09 + 4.35
  43. price *= months_to_pay
  44. else:
  45. price = months_to_pay * 17.09
  46. elif contract_type == "Large":
  47. if internet == "yes":
  48. price = 23.59 + 4.35
  49. price *= months_to_pay
  50. else:
  51. price = months_to_pay * 23.59
  52. else:
  53. if internet == "yes":
  54. price = 31.79 + 3.85
  55. price *= months_to_pay
  56. else:
  57. price = months_to_pay * 31.79
  58. price = price - price * 0.0375
  59. print(f"{price:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment