I have written a program to calll exchange rates from a file but it prints an output fo reach row, there is a logic error but i cant't find it.
import csv
exRtFile = open ('exchangeRate.csv')
exchReader = csv.reader(exRtFile)
newCurrency = raw_input("Please enter the currency you would like to convert to: ")
for row in exchReader:
currency = row[0]
if currency == newCurrency:
newRt = row[1]
print(newRt)
break
print("Sorry, that is not a valid currency")
file:
Pound Sterling,1
Euro,1.22
US Dollar,1.67
Japanese Yen,169.948