Sichanov

ee

Jan 17th, 2021
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.14 KB | None | 0 0
  1. term_of_the_contract = input()
  2. type_of_the_contract = input()
  3. mobile_internet = input()
  4. number_of_months = int(input())
  5.  
  6. price_term = 0
  7.  
  8. if term_of_the_contract == "one":
  9.     if type_of_the_contract == "Small":
  10.         price_term = 9.98
  11.     elif term_of_the_contract == "Middle":
  12.         price_term = 18.99
  13.     elif term_of_the_contract == "Large":
  14.         price_term = 25.98
  15.     elif term_of_the_contract == "ExtraLarge":
  16.         price_term = 35.99
  17. elif term_of_the_contract == "two":
  18.     if type_of_the_contract == "Small":
  19.         price_term = 8.58
  20.     elif type_of_the_contract == "Middle":
  21.         price_term = 17.09
  22.     elif type_of_the_contract == "Large":
  23.         price_term = 23.59
  24.     elif type_of_the_contract == "ExtraLarge":
  25.         price_term = 31.79
  26.  
  27.  
  28.  
  29. if mobile_internet == "yes":
  30.     if price_term <= 10:
  31.         price_term += 5.50
  32.     elif price_term <= 30:
  33.         price_term += 4.35
  34.     elif price_term > 30:
  35.         price_term += 3.85
  36.  
  37. if term_of_the_contract == 'two':
  38.     price_term = price_term - price_term * 3.75 / 100
  39.  
  40. final_price = price_term * number_of_months
  41. print(f"{final_price:.2f} lv.")
  42.  
Advertisement
Add Comment
Please, Sign In to add comment