Changes

Jump to: navigation, search

OPS435 Python Lab 3

19 bytes added, 10:29, 2 June 2017
PART 1 - Providing Functions With Arguments
:::*The script should contain show the exact output as the sample imports
:::*The script should contain no errors
 :::3. '''Sample Run 1:'''<source>
run lab3c.py
15
Error: function operator can be "add", "subtract", or "multiply"
</source>
 :::4. '''Sample Import 1Run 2 (with import):'''<source>
import lab3c
lab3c.operate(10, 20, 'add')
Error: function operator can be "add", "subtract", or "multiply"
</source>
:::53. Exit the ipython3 shell, download the checking script and check your work. Enter the following commands from the bash shell.<source>
cd ~/ops435/lab3/
pwd #confirm that you are in the right directory
python3 ./CheckLab3.py -f -v lab3c
</source>
:::64. Before proceeding, make certain that you identify any and all errors in lab3c.py. When the checking script tells you everything is OK before proceeding to the next step.
Make notes for all of your observations in your lab log book, and proceed to Part 2.
13,420
edits

Navigation menu