Changes

Jump to: navigation, search

OPS435 Python Lab 2

75 bytes removed, 12:18, 26 May 2017
PART 2 - Understanding WHILE Loops with Arguments
:#Now lets make the same script more intelligent. Make a copy of '''lab2e.py''' and call it '''lab2f.py'''. Now modify :#Modify '''lab2f.py''', modify to change the initial value of timer the variable '''count''' to user the first argument provided to the when running your Python script. This will allow the argument to choose how long the timer is. :::'''WARNING: ''' When using arguments as numbers/integers or performing math on arguments you must wrap them in the int() function, for example: number '''count = int(sys.argv[1])'''   
::*The script should have a Shebang line
::*The script should import sys
13,420
edits

Navigation menu