trying to get a program to enter a students name and score, test it to make sure score is a vaule >=0 and <=100 and save results to a file and loop back
gradeFile = open("grade.dat","a")
Score = "0"
while Score>=0:
Name = raw_input("What is the students's name?: ")
Score = float(raw_input("What is the students's score?: "))
while Score <0 or Score >100 :
print("ERROR: the grade cannot be less than 0 or more than 100")
Score = float(raw_input("What is the students's score?: "))
gradeFile.write(Name+"\n")
gradeFile.write(Score+"\n")
gradeFile.close()
print("Data saved to grade.dat")
TypeError: unsupported operand type(s) for +: 'float' and 'str', you can change it to gradeFile.write(str(Score)+"\n")