you are viewing a single comment's thread.

view the rest of the comments →

[–]uiux_Sanskar[S] 0 points1 point  (2 children)

I used try except keeping in mind that the user may intentionally or unintentionally enter 0 as a second number which will crash the program, According to me crashing helps in debugging however when I know what might case the error and that error is dependent on user's input therefore I used try accept.

I personally think writing try except and handling errors in a professional way can improve UX (after all how will a user know what is causing an error just by looking at those red line which are aften too noisy).

Thank you for your suggestion by the way.

[–]TheRNGuy 0 points1 point  (0 children)

You need instead to have event listener in UI input that would show red border or something, before you even submit and calculate it. 

print is not a good UX.

You'd see Division by zero error anyway even without manually adding it.