In: Computer Science
Provide a screenshot of your script code and a screenshot of running the scripts with test inputs.
Write a script to check command arguments (3 arguments maximum). Display the argument one by one. If there is no argument provided, remind users about the mistake.
#source code:
nvs.py
import sys
arguments_count=len(sys.argv)-1
if(arguments_count>3):
print("you Enter More than 3 commandline
arguments")
elif(arguments_count==0):
print("you didn't give any arguments")
else:
for i in range(1,arguments_count+1):
print(sys.argv[i])
#output::
#if you have any doubts comment below..