From e1178f070fc71d2ae23653d472ec43084cf8a807 Mon Sep 17 00:00:00 2001 From: maverick Date: Thu, 6 Oct 2022 12:34:08 +0530 Subject: [PATCH] currency_converter --- project currency_converter/main.py | 9 +++++++++ project currency_converter/requirements.txt | 1 + 2 files changed, 10 insertions(+) create mode 100644 project currency_converter/main.py create mode 100644 project currency_converter/requirements.txt diff --git a/project currency_converter/main.py b/project currency_converter/main.py new file mode 100644 index 0000000..ddb77d1 --- /dev/null +++ b/project currency_converter/main.py @@ -0,0 +1,9 @@ +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) \ No newline at end of file diff --git a/project currency_converter/requirements.txt b/project currency_converter/requirements.txt new file mode 100644 index 0000000..f729049 --- /dev/null +++ b/project currency_converter/requirements.txt @@ -0,0 +1 @@ +forex-python==1.8 \ No newline at end of file