Changes

Jump to: navigation, search

OPS435 Python Lab 1

219 bytes removed, 09:12, 16 May 2017
Part 4 - Evaluation
=== Part 4 - Evaluation ===
Create :#To gain practice, create a python script: (called lab1c.py* The script should have a Shebang line.* The script should have a variable called '''name'''* The script should have a variable called '''age'''* The value of ) with the '''name''' variable should be '''Isaac'''* The variable '''age''' should contain a integer* The value of the '''age''' variable should be '''72'''* The script, when executed, should print out "Isaac is 72 years old!"following content and details:
 :::* The script should have a Shebang line.:::* The script should have a variable called '''name''':::* The script should have a variable called '''age''':::* The value of the '''name''' variable should be '''Isaac''':::* The variable '''age''' should contain a integer:::* The value of the '''age''' variable should be '''72''':::* The script, when executed, should print out "Isaac is 72 years old!" :::Example run: <presource>
%cd ~/ops435/lab1/
%run ./lab1c.py
Isaac is 72 years old!
</presource><br> Try the check script as you are working through a script to sometimes get hints.<br> ==== Part 4 - Lab Check lab1c ==== 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 lab1c
</presource:#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. 
=== PART 5 - MATH OPERATORS ===
13,420
edits

Navigation menu