1,234
edits
Changes
→PART 1 - Using IF Statements
:::*The script should '''import sys'''
:::*The script should print a '''usage message''' if zero arguments present, or likewise, if not exactly 2 arguments are NOT provided when running script<br>(NOTE: Use '''sys.argv[0]''' value in this message in case you rename the script at a later date!)
:::*The script should use '''sys.exit()''' (i.e. without attempting to 'abort' script) do any more work if zero arguments, or likewise, if not exactly 2 arguments are not provided when running script
:::*The script should use a variable called '''name'''
:::*The script should use a variable called '''age'''