Advertisement
miglenabs

Untitled

Dec 5th, 2022
667
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.97 KB | None | 0 0
  1. duration_of_contract = str(input())
  2. type_of_contract = str(input())
  3. mobile_internet = str(input())
  4. count_months = int(input())
  5.  
  6. total_sum = 0
  7. if duration_of_contract == "one":
  8.     if type_of_contract == "Small":
  9.         if mobile_internet == "yes":
  10.             total_sum = (count_months * 9.98) + (5.50 * count_months)
  11.         else:
  12.             total_sum = count_months * 9.98
  13.     elif type_of_contract == "Middle":
  14.         if mobile_internet == "yes":
  15.             total_sum = (count_months * 18.99) + (4.35 * count_months)
  16.         else:
  17.             total_sum = count_months * 18.99
  18.     elif type_of_contract == "Large":
  19.         if mobile_internet == "yes":
  20.             total_sum = (count_months * 25.98) + (4.35 * count_months)
  21.         else:
  22.             total_sum = count_months * 25.98
  23.     elif type_of_contract == "ExtraLarge":
  24.         if mobile_internet == "yes":
  25.             total_sum = (count_months * 35.99) + (3.85 * count_months)
  26.         else:
  27.             total_sum = count_months * 35.99
  28.  
  29. elif duration_of_contract == "two":
  30.     if type_of_contract == "Small":
  31.         if mobile_internet == "yes":
  32.             total_sum = (count_months * 8.58) + (5.50 * count_months) * 0.9625
  33.         else:
  34.             total_sum = (count_months * 8.58) * 0.9625
  35.     elif type_of_contract == "Middle":
  36.         if mobile_internet == "yes":
  37.             total_sum = (count_months * 17.09) + (5.50 * count_months) * 0.9625
  38.         else:
  39.             total_sum = (count_months * 17.09) * 0.9625
  40.     elif type_of_contract == "Large":
  41.         if mobile_internet == "yes":
  42.             total_sum = (count_months * 23.59) + (5.50 * count_months) * 0.9625
  43.         else:
  44.             total_sum = (count_months * 23.59) * 0.9625
  45.     elif type_of_contract == "ExtraLarge":
  46.         if mobile_internet == "yes":
  47.             total_sum = (count_months * 31.79) + (5.50 * count_months) * 0.9625
  48.         else:
  49.             total_sum = (count_months * 31.79) * 0.9625
  50.  
  51.  
  52. print(f"{total_sum:.2f} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement