Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 2

111 bytes removed, 03:02, 25 May 2017
PART 2 - 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 '''lab2f.py''', modify the value of timer to user the first argument provided to the script. This will allow the argument to choose how long the timer is.
<blockquote style="margin-leftWARNING:35px;">{{Admon/important|style="padding-left:25px"|Arguments and Integers|When using arguments as numbers/integers or performing math on arguments you must wrap them in the int() function, for example: number = int(sys.argv[1])}}</blockquote>
198
edits