Question: Rewrite the previous program using try and except so that your program handles non - numeric inputs gracefully by printing a message and exiting the
Rewrite the previous program using try and except so that your program handles nonnumeric inputs gracefully by printing a message and exiting the program. The following shows two executions of the program with invalid inputs. The program should work the same as before with valid inputs.
Output:
Enter your Hours and salary rate
Your gross pay is $
PS C:UsersmvimalcruzDesktopPython LabLab & C:Program FilesPythonpythonexe"
c:UsersmvimalcruzDesktopPythonLabLab labpy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
