Advertisement
dgodinov

Задача: Парички 105стр. учебник

Apr 5th, 2021
1,045
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. bitcoins_of_pesho = int(input())
  2. china_money_of_pesho = float(input())
  3. change_comission = float(input())
  4.  
  5. one_bitcoin_to_leva = 1168
  6. one_china_money_to_usd = 0.15
  7. one_usd_to_bgn = 1.76
  8. one_euro_to_bgn = 1.95
  9. one_china_money_to_bgn = one_usd_to_bgn * one_china_money_to_usd
  10.  
  11. sum_bitcoin_to_euro = (bitcoins_of_pesho * one_bitcoin_to_leva) / one_euro_to_bgn
  12. sum_china_money_to_bgn = china_money_of_pesho * one_china_money_to_bgn
  13. sum_china_money_to_euro = sum_china_money_to_bgn / one_euro_to_bgn
  14.  
  15. sum_comission = (sum_bitcoin_to_euro+sum_china_money_to_euro) * change_comission / 100
  16. final_sum = (sum_bitcoin_to_euro + sum_china_money_to_euro) - sum_comission
  17. print("%.2f" % final_sum)
  18.  
  19.  
  20. #print(round(final_sum, 2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement