Changes

Jump to: navigation, search

OPS435 Python Lab 1

246 bytes removed, 12:24, 16 May 2017
no edit summary
100 / ((5 + 5) * 2) # the inner most parentheses are first performing addition, then parentheses again with multiplication, finally the division
</source>
 ===Part 5 - Evaluation === Create :#To gain practice, create a python script: (called lab1d.py) with the following content and details:::* The script should have a Shebang line.::* The variable '''x''' should contain a integer with the value '''10'''::* The variable '''y''' should contain a integer with the value '''2'''::* The variable '''z''' should contain a integer with the value '''5'''::* The script, when executed, should print out "10 + 2 * 5 = 20" :::Example run: <presource>
%cd ~/ops435/lab1/
%run ./lab1d.py
10 + 2 * 5 = 20
</presource><br> Try the check script as you are working through a script to sometimes get hints.<br><br> === Part 5 - Lab Check lab1d === This course is designed with a unit testing suite, which can be used to look at the scripts you write and give real-time feedback. This feedback is not perfect, however it may offer some hints if you get stuck with a error. It can also be used to make sure you are on the write track, :#Download and show progress. Download run the check checking script. Enter the following commands from the bash shell.:<presource>
cd ~/ops435/lab1/
pwd #confirm that you are in the right directory
ls CheckLab1.py || wget matrix.senecacollege.ca/~acoatley-willis/CheckLab1.py
python ./CheckLab1.py -f -v lab1d
</presource><br> Before moving on to the next step make sure you identify any and all errors in "lab1a.py". When the check script tells you everything is "ok", you may procede to the next step.<br><br>
= LAB 1 SIGN-OFF (SHOW INSTRUCTOR) =
13,420
edits

Navigation menu