When I execute my code I get the NameError. I don\'t understand why in line 23 it throws this error when in line 22 it is able to access the variable and succes