Changes

Jump to: navigation, search

OPS435 Python Lab 2

176 bytes added, 08:30, 26 May 2017
PART 1 - Using IF Statements
:::*The script should have a '''Shebang line'''
:::*The script should '''import sys'''
:::*The script should print a '''usage message''' IF additional 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. to 'abort' script) if two additional 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'''
13,420
edits

Navigation menu