MENU
Question -

What will happen when you run the following program:
import sys
try:
t = sys.arg[1]
a = sys.arg[2]
except:
print ‘You must provide TWO
command-line arguments!!!’
sys.exit(1)
s = 0.5*a*t**2
print s



Answer -

The program will always respond with, “You must provide TWO command-line arguments!!!”, regardless of what you write on the command line

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×