Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/currency.py Secret

Created Jan 27, 2021
Embed
What would you like to do?
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