While testing my program I got an error saying
“carreg = input (“car reg”)
File “”, line 1
kj56 ncb
^
SyntaxError: unexpected EOF while parsing”
How do I fix this? Excuse the most likely bad coding I have just started my GCSE Course.
This is the whole program:
import csv
carno = 'CarRegestration.csv'
carDetails = open(carno,'r')
fileReader = csv.reader(carDetails, delimiter= ',')
people = []
for row in fileReader:
people.extend(row)
carDetails.close()
print("
".join(people))
carreg = input ("Input the Cars Regetration:")
speed = int(input("speed"))
speedstr = str(speed)
count = 0
while count <60:
if (people[count]) != carreg:
count=count+3
else:
message = carreg + "was driving at" + speedstr + "mph. Owner" +people [count +1] +""+ people [count+2]+". You have recieved a fine at the sum of £50 and 3 points on your licence."
print(message)
with open ("Speedingfine.csv","w") as fine:
fine.write("{}
".format(message))
numplate = count
count = 100