Currency Converter (Main Codes)

print("Simple Currency Converter")


with open('currencyData.txt') as f:

    lines = f.readlines()


currencyDict = {} # For this I have made Another Dictionary According to current values of Currencies

for line in lines:

    parsed = line.split("\t")

    currencyDict[parsed[0]] = parsed[1]


amount = int(input("Enter Amount:\n"))

print("Enter the name of currency you want to convert this amount to:\n \n Available Options:")

[print(item) for item in currencyDict.keys()] 

currency = input("\n Please Enter one of the above values: \n")

print(f"\n{amount} INR is equal to {amount*float(currencyDict[currency])} {currency}")

 

print("\nThank You for using Simple Currency Converter,\n")


--------------

Copy till print("\nThank You for using Simple Currency Converter,\n") from print("Simple Currency Converter")

--------------


currencyDict = Argentine Peso 0.975455 1.025162

Australian Dollar 0.018678 53.537685

Bahraini Dinar 0.005022 199.135502

Botswana Pula 0.154930 6.454522

Brazilian Real 0.071694 13.948096

British Pound 0.010220 97.843094

Bruneian Dollar 0.018329 54.557144

Bulgarian Lev 0.022134 45.179355

Canadian Dollar 0.017679 56.564170

Chilean Peso 10.597388 0.094363

Chinese Yuan Renminbi 0.092783 10.777844

Colombian Peso 50.371622 0.019852

Croatian Kuna 0.085148 11.744206

Czech Koruna 0.295763 3.381090

Danish Krone 0.084290 11.863795

Emirati Dirham 0.049048 20.388005

Euro 0.011317 88.363137

Hong Kong Dollar 0.103514 9.660563

Hungarian Forint 3.911890 0.255631

Icelandic Krona 1.823149 0.548501

Indonesian Rupiah 198.230875 0.005045

Iranian Rial 560.862997 0.001783

Israeli Shekel 0.045438 22.007841

Japanese Yen 1.425541 0.701488

Kazakhstani Tenge 5.605663 0.178391

Kuwaiti Dinar 0.004085 244.790883

Libyan Dinar 0.018295 54.660560

Malaysian Ringgit 0.056062 17.837478

Mauritian Rupee 0.530466 1.885136

Mexican Peso 0.296577 3.371808

Nepalese Rupee 1.607500 0.622084

New Zealand Dollar 0.020429 48.948941

Norwegian Krone 0.119172 8.391254

Omani Rial 0.005135 194.733287

Pakistani Rupee 2.246975 0.445043

Philippine Peso 0.650890 1.536357

Polish Zloty 0.049723 20.111427

Qatari Riyal 0.048614 20.570041

Romanian New Leu 0.054724 18.273519

Russian Ruble 0.979080 1.021367

Saudi Arabian Riyal 0.050084 19.966653

Singapore Dollar 0.018329 54.557144

South African Rand 0.233259 4.287086

South Korean Won 15.827716 0.063180

Sri Lankan Rupee 2.443835 0.409193

Swedish Krona 0.116356 8.594341

Swiss Franc 0.012160 82.235241

Taiwan New Dollar 0.393112 2.543807

Thai Baht 0.415252 2.408178

Trinidadian Dollar 0.090387 11.063549

Turkish Lira 0.098410 10.161613

US Dollar 0.013356 74.874949

Venezuelan Bolivar 0.133389 7.496866

Note: These currencies are not correct for the present Time but for the Time when I made this Currency Converter, These currencies were correct. Search from Webbrowser for current and correct Values of currencies.

Comments

Popular Posts