how could i call the above function so that when i input something like 21 for the mark the ouput is "the grade is A", and when the user inputs something more than 25 and less than 0 hes asked to input it again..?
def mark2Grade(mark):
if mark >=20:
return "A"
elif mark >=15:
return "B"
elif mark >=10:
return "C"
else:
return "Fail"
def gradeTest():
mark=input("please enter the mark: ")
print "your grade is", mark2Grade