Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 27, 2021 08:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/6940b3f915038cad41325f80815cb08c to your computer and use it in GitHub Desktop.
Save amankharwal/6940b3f915038cad41325f80815cb08c to your computer and use it in GitHub Desktop.
from forex_python.converter import CurrencyRates
c = CurrencyRates()
amount = int(input("Enter the amount: "))
from_currency = input("From Currency: ").upper()
to_currency = input("To Currency: ").upper()
print(from_currency, " To ", to_currency, amount)
result = c.convert(from_currency, to_currency, amount)
print(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment