this is my current code, however the the input doesn't change to an integer can someone help me pls
score = [0,20,40,60,80,100,120]
def validate_credits(input_credits):
try:
input_credits = int(input_credits)
except:
raise ValueError('integer required')
if input_credits not in score:
raise ValueError('out of range')
while True:
try:
mark1 = input('Enter your total PASS marks: ')
validate_credits(mark1)
mark2 = input('Enter your total DEFER marks: ')
validate_credits(mark2)
mark3 = input('Enter your total FAIL marks: ')
validate_credits(mark3)
except ValueError as e:
print(e)