Advertisement
exDotaPro

2019_2_may_3_mobile_operator

Feb 1st, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.09 KB | None | 0 0
  1. contract_length = input()
  2. contract_type = input()
  3. internet = input()
  4. num_of_fees = int(input())
  5.  
  6. contract_price = 0
  7. internet_price = 0
  8. discount = False
  9.  
  10. if contract_length == 'one':
  11.  
  12.     if contract_type == 'Small':
  13.         contract_price = 9.98
  14.     elif contract_type == 'Middle':
  15.         contract_price = 18.99
  16.     elif contract_type == 'Large':
  17.         contract_price = 25.98
  18.     elif contract_type == 'ExtraLarge':
  19.         contract_price = 35.99
  20.  
  21. elif contract_length == 'two':
  22.     discount = True
  23.  
  24.     if contract_type == 'Small':
  25.         contract_price = 8.58
  26.     elif contract_type == 'Middle':
  27.         contract_price = 17.09
  28.     elif contract_type == 'Large':
  29.         contract_price = 23.59
  30.     elif contract_type == 'ExtraLarge':
  31.         contract_price = 31.79
  32.  
  33. if internet == 'yes':
  34.  
  35.     if contract_price > 30:
  36.         internet_price = 3.85
  37.     elif contract_price <= 10:
  38.         internet_price = 5.50
  39.     else:
  40.         internet_price = 4.35
  41.  
  42. total = (contract_price + internet_price) * num_of_fees
  43.  
  44. if discount:
  45.     total *= 0.9625
  46.  
  47. print(f'{total:.2f} lv.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement