Question: Data programming: Python ->import sys and argv. NOT INPUT FUNCTION. 2. Rewrite the previous program using try and except so that your program handles non-numeric

Data programming: Python ->import sys and argv. NOT INPUT FUNCTION.
2. Rewrite the previous program using try and except so that your program handles non-numeric 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.
Input:
a) assign3-2.py 35 ten
b) assign3-2.py forty 10
Output:
a) Error, please enter numeric input.
b) Error, please enter numeric input.
1. Filename: assign3-1.py Write a program that computes your gross pay. Your code should get two numbers: hours and rate per hour. You should give the employee 1.75 times tfe hourly rate for hours worked above 40 hours. Input: python C:\Users ede\Data Programming MS\assign3-1.py 45 10 Output: Your gross pay 15 1487.5 2. Filename: assign 3-2.py Rewrite the previous program using try and except so that your program handles non-numeric inputs gracefully by printing a message and exciting the program. The following shows two executions of the program with invalid inputs. The program should work the same as before with valid inputs. Input: a) python C:\Users eda Data Programming M233193-2.py 35 ten b) python C:\Users\Data Programin 31 sign 3-2.py forty 10 Output: a) Error, please enter hunti input. b) Erron, please enter numerio input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
