Advertisement
nikol_bratkova

Untitled

Mar 13th, 2022
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sms = int(input())
  2. mins = int(input())
  3.  
  4. free_sms = 20
  5. free_mins = 60
  6. plan = 12
  7. add_sms = sms - free_sms
  8. add_mins = mins - free_mins
  9.  
  10. if add_sms > 0:
  11. sms_cost = 0.06 * add_sms
  12.  
  13. #sms_cost = "{:.2f}".format(sms_cost)
  14. print(f'{add_sms} additional messages for {"{:.2f}".format(sms_cost)} levas')
  15. else:
  16. add_sms = 0
  17. sms_cost = 0.00
  18.  
  19. # sms_cost = "{:.2f}".format(sms_cost)
  20. print(f'{add_sms} additional messages for {"{:.2f}".format(sms_cost)} levas')
  21.  
  22. if add_mins > 0:
  23. mins_cost = 0.10 * add_mins
  24.  
  25. # mins_cost = "{:.2f}".format(mins_cost)
  26. print(f'{add_mins} additional messages for {"{:.2f}".format(mins_cost)} levas')
  27. else:
  28. add_mins = 0
  29. mins_cost = 0.00
  30.  
  31. # mins_cost = "{:.2f}".format(mins_cost)
  32. print(f'{add_mins} additional messages for {"{:.2f}".format(mins_cost)} levas')
  33.  
  34. tax = 0.20 * (mins_cost + sms_cost)
  35. # format_tax = "{:.2f}".format(tax)
  36. print(f'{"{:.2f}".format(tax)} additional taxes')
  37.  
  38. total = plan + mins_cost + sms_cost + tax
  39. # format_total = "{:.2f}".format(total)
  40. print(f'{"{:.2f}".format(total)} total bill')
Advertisement
RAW Paste Data Copied
Advertisement