May-07-2020, 05:16 AM
(May-06-2020, 08:52 PM)chpyel Wrote: how I control the data input from user input error
You have answer to your initial question - use try...except.
How to implement is another story. You haven't given enough information to understand what you want to accomplish. As it smells like homework I would just generalise: one can have validation function which checks user input with try...except and returns only valid value. One can apply this function to whatever number of user inputs and assign result to whatever variable.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.