Changes

Jump to: navigation, search

OPS435 Python Lab 2

No change in size, 07:57, 26 May 2017
PART 1 - Using IF Statements
<blockquote style="margin-left:35px;">{{Admon/important|style="padding-left:25px"|Number of Arguments with len(sys.argv)|If you are running the '''len(sys.argv)''' function in ipython3, the number of arguments returned will be always be '1'. This number will always be one higher than the actual number of arguments entered, since it also counts the script name as a argument.}}</blockquote>
''' Practice Using If IF Statements '''
:#Now it's time to create a new script. Make a copy of '''lab2c.py''' and call it '''lab2d.py'''. Now modify '''lab2d.py''', add a if statement right before your print statements. This if statement should make sure that lab2d.py is using '2' additional arguments.
13,420
edits

Navigation menu