I'm trying to increase the count each time the function is run, it seems as though count is being reset each time the function is run. I think the count in the if statement may not be the same one that's passed as a condition. Thanks
def check_solution(user_solution, solution, count):
if user_solution == solution:
count =+1
print(count)
return count
else:
print("Incorrect")
Aucun commentaire:
Enregistrer un commentaire