why in this two codes when put inv as globle var the function is work correctly (return the inverse of a number) , but when make it local return 4 (if N = 1234)
I thought in this case it will return 1 in case of N = 1234?
New contributor
Student is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1