Open main menu

CDOT Wiki β

Changes

OPS445 Online Lab1

9 bytes removed, 13:09, 10 September 2021
no edit summary
If your professor is asking you to submit labs on GitHub, follow their instructions now to clone the lab1 repository.
Otherwise, download the sample.py script from https://github.com/rayfreeping/ops435ops445-lab1 repository to ~/ops445/lab1 directory
:* Study and Explore the sample.py python script and identify the following sections:
== Part I - Interactive (leaning) mode: using the Python Interactive Shell ==
:* In this mode, you can instruct the Python Interpreter to execute python statement or python expression one at a time, call a function, or display the representation of a python data object.
:* To start the Python version 3 Interactive shell, type the command <source>[raymonderic.chanbrauer@mtrx-node05pd lab1]$ python3</source> at the Linux command prompt.
:* You should get a startup message similar to the following:<source>
[raymonderic.chanbrauer@mtrx-node05pd lab1]$ python3
Python 3.6.8 (default, Apr 2 2020, 13:34:55)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
pwd #confirm that you are in the right directory
ls lab1a.py #confirm that you have the lab1a.py script in your directory
ls CheckLab1.py || wget https://ict.senecacollege.ca/~raymonderic.chanbrauer/ops445/labs/LabCheckScripts/CheckLab1.py
python3 ./CheckLab1.py -f -v lab1a
</source>
cd ~/ops445/lab1/
pwd #confirm that you are in the right directory
ls CheckLab1.py || wget https://ict.senecacollege.ca/~raymonderic.chanbrauer/ops435ops445/labs/CheckScripts/CheckLab1.py
python3 ./CheckLab1.py -f -v lab1b
</source></li>
cd ~/ops445/lab1/
pwd #confirm that you are in the right directory
ls CheckLab1.py || wget https://ict.senecacollege.ca/~raymonderic.chanbrauer/ops435ops445/labs/LabCheckScripts/CheckLab1.py
python3 ./CheckLab1.py -f -v lab1c
</source></li>
cd ~/ops445/lab1/
pwd #confirm that you are in the right directory
ls CheckLab1.py || wget https://ict.senecacollege.ca/~raymonderic.chanbrauer/ops435ops445/masterlabs/LabCheckScripts/CheckLab1.py
python3 ./CheckLab1.py -f -v lab1d
</source>Before moving on to the next step make sure you identify any and all errors in "lab1d.py".<br><br></li>
:# How do you execute a Python script when you are within the interactive <u>python3</u> shell? (Hint: make use of a function provided by the os python module.)
:# How do you execute a Python script when you are in the <u>Bash</u> Shell (i.e. NOT within the python3 shell)?
:# Write the pipeline command to check if the CheckLab1.py checking script exists, and download it from the location:<br>https://ict.senecacollege.ca/~raymonderic.chanbrauer/ops445/labs/LabCheckScripts/CheckLab1.py