13,420
edits
Changes
→PART 2 - Arguments
''' Practice Using Arguments '''
:Now it's time to create a new script, but unlike prompting the user for data, the data (as arguments from running your Python script) will be used instead. to prompt the user to enter data and display that data on their terminal. Refer to variable name and prompt text information when creating your Python script. Refer to Sample Runs displayed below for exact prompt and output requirements. Make a copy of '''lab2b.py''' and call it '''lab2c.py'''. Now modify '''lab2c.py''' so that it uses 'sys.argv[1]' and 'sys.argv[2]' instead of the input() functions. Example output is shown below:
::*The script should have a Shebang line