Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USD_TO_BGN_EXCCHANGE_RATE = 1.79549
- EUR_TO_BGN_EXCHANGE_RATE = 1.95583
- GBP_TO_BGN_EXCHANGE_RATE = 2.53405
- current_currency = float(input())
- string_1 = input()
- string_2 = input()
- bgnValue = 0
- if string_1 == 'USD':
- bgnValue = current_currency * USD_TO_BGN_EXCCHANGE_RATE
- elif string_1 == 'BGN':
- bgnValue = current_currency
- elif string_1 == 'EUR':
- bgnValue = current_currency * EUR_TO_BGN_EXCHANGE_RATE
- elif string_1 == 'GBP':
- bgnValue = current_currency * GBP_TO_BGN_EXCHANGE_RATE
- convertedValue = 0
- if string_2 == 'USD':
- convertedValue = bgnValue / USD_TO_BGN_EXCCHANGE_RATE
- elif string_2 == 'BGN':
- convertedValue = bgnValue
- elif string_2 == 'EUR':
- convertedValue = bgnValue / EUR_TO_BGN_EXCHANGE_RATE
- elif string_2 == 'GBP':
- convertedValue = bgnValue / GBP_TO_BGN_EXCHANGE_RATE
- print(f'{convertedValue:0.2f} {string_2}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement