Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Instead of printing an error message and aborting the program explicitly, raise a ValueError exception in the if test on legal t values in the
Instead of printing an error message and aborting the program explicitly, raise a ValueError exception in the if test on legal t values in the program below. Include the legal interval for t in the exception message.
How do I update the code to meet the question?
import sys try: ve - float(sys.argv[1]) except IndexError: print"User doesn't provide vo as input" sys.exit(1) try: t = float(sys.argv[2]) except IndexError: print"User doesn't provide t as input" sys.exit(2) 8 = 9.81 a = float(2.6*vo/g) if t > and tStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started