Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- amount = float(input())
- cur_from = str(input())
- cur_to = str(input())
- bgn_c = 1
- usd_c = 1.79549
- eur_c = 1.95583
- gbp_c = 2.53405
- if cur_from == 'USD':
- amount *= usd_c
- if cur_to == 'GBP':
- print(round(amount / gbp_c , 2), 'GBP')
- if cur_to == 'EUR':
- print(round(amount / eur_c , 2), 'EUR')
- if cur_to == 'BGN':
- print(round(amount / bgn_c , 2), 'BGN')
- elif cur_from == 'BGN':
- amount *= bgn_c
- if cur_to == 'GBP':
- print(round(amount / gbp_c , 2), 'GBP')
- if cur_to == 'EUR':
- print(round(amount / eur_c , 2), 'EUR')
- if cur_to == 'USD':
- print(round(amount / usd_c , 2), 'USD')
- elif cur_from == 'GBP':
- amount *= gbp_c
- if cur_to == 'BGN':
- print(round(amount / bgn_c , 2), 'BGN')
- if cur_to == 'EUR':
- print(round(amount / eur_c , 2), 'EUR')
- if cur_to == 'USD':
- print(round(amount / usd_c , 2), 'USD')
- elif cur_from == 'EUR':
- amount *= eur_c
- if cur_to == 'BGN':
- print(round(amount / bgn_c , 2), 'BGN')
- if cur_to == 'GBP':
- print(round(amount / gbp_c , 2), 'GBP')
- if cur_to == 'USD':
- print(round(amount / usd_c , 2), 'USD')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement