Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 307064a

Browse files
committed
Currency Converter
1 parent 58ce45e commit 307064a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
Author : Robin Singh
3+
Currency Converter
4+
5+
"""
6+
with open('CurrencyData.txt') as r:
7+
data = r.readlines()
8+
currency_dict = {}
9+
for line in data:
10+
parsed = line.split("\t")
11+
currency_dict[parsed[0]] = parsed[1]
12+
13+
r.close()
14+
15+
16+
17+
18+
amt = int(input("Entre Amount\n"))
19+
print("Entre Currency Name : ")
20+
21+
print("Available options\n ")
22+
[print(item) for item in currency_dict.keys()]
23+
Curr = input("Entre Name Of the Currency")
24+
newmoney = amt * float(currency_dict[Curr])
25+
print(currency_dict[Curr])
26+
print(f"{amt} INR is equal to {newmoney} {Curr}")

0 commit comments

Comments
 (0)