Question: write a python 3 program that allows for the following mandatory & optional Command line arguments to be used when running the program: name(mandatory) color(optional)
write a python 3 program that allows for the following mandatory & optional Command line arguments to be used when running the program:
name(mandatory) color(optional) type(optional)
when the program is run through the command line, the user must be able to add these so that the program may print out the values provided. If a value is not provided for the optional variables, hide the field.
Possible results:
RESULT 1: name: James color: white type: hat
RESULT 2: name: Paul type: scarf RESULT 3: name: Jack RESULT 4: name: Sam color: blue
Step by Step Solution
There are 3 Steps involved in it
To achieve the requirements outlined in your question we need to create a Python script that can handle command line arguments Well make use of the ar... View full answer
Get step-by-step solutions from verified subject matter experts
