I know this is basic but i actually don't even know what I've done wrong.
while True:
try:
end=int(input("If You Dont Want To Buy Anything Press 1 To Exit\nOr If You Would Like To Try Again Please Press 2"))
except ValueError:
print("\nPlease Enter Only 1 Or 2")
if end==1:
exit()
elif end==2:
continue
I have literally defined end at the start and yet the error is NameError: name 'end' is not defined I've even tried making end a global.
endis only assigned to if there was noValueError. Ifint()raises an exception, then the assignment never takes place.