a code i've done for my assignment, except upon choosing '0' to exit the while loop, the function creates an 'ans' variable which is unwarranted.
If the entire code is ran inside a script, this does not occur. How may i suppress this? Unless i'm missing something obvious i am puzzled how this is happening. Thank you
Edit: Actual code removed once problem was fixed to avoid future plagiarising of assignment
Best Answer