Created
December 24, 2022 18:11
-
-
Save CodeMaster7000/5e294652368d577fb1373839092d9b6b to your computer and use it in GitHub Desktop.
A handy currency converter coded in Python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from forex_python.converter import CurrencyRates | |
import time | |
cr = CurrencyRates() | |
amount = int(input("Enter the amount you want to convert: ")) | |
time.sleep(1) | |
from_currency = input("Enter the currency code to be converted: ").upper() | |
time.sleep(1) | |
to_currency = input("Enter the currency code to convert to: ").upper() | |
time.sleep(1) | |
print("Summary: You are converting", amount, from_currency, "to", to_currency) | |
time.sleep(2) | |
output = cr.convert(from_currency, to_currency, amount) | |
print("The converted rate is:", output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment