pip install forex_python
Code :
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)
#clcoding.com
Output :
Enter the amount: 10 From Currency: EUR To Currency: INR EUR To INR 10 888.9
0 Comments:
Post a Comment