We cannot really give you advice, because you don't show your full code.
In any case you can refactor your code, so that any calculations are performed after you enter your data (e.g. require user to click a button to perform calculations) or if you don't want to click a button you can handle the error and/or set default value for the Var/Entry (e.g. 1.0, value will depend on your business case) and/or use if to check z value before performing calculations
In any case you can refactor your code, so that any calculations are performed after you enter your data (e.g. require user to click a button to perform calculations) or if you don't want to click a button you can handle the error and/or set default value for the Var/Entry (e.g. 1.0, value will depend on your business case) and/or use if to check z value before performing calculations
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs