#Import the module from math import sqrt #Using while loop statement to make the program not finish before the user close the program. while True: #Print out the intro
The reason giving u type error is you did not store and update the variables after calling the function.
Try
a = func_num(a) b = func_num(b) c = func_num(c)
And modify your function to return n because you only passing a copy n into the function