Changes

Jump to: navigation, search

Rchan sandbox

20 bytes added, 21:29, 3 November 2019
LAB 7 SIGN-OFF (SHOW INSTRUCTOR)
return '%.2d.%2d.%2d' % (self.hour, self.minute, self.second)
</source>
:6. Add the function definition for __repr__() after the __str__() function in lab7dlab7e.py. Please note that we use the '.' instead of ':' in the formatting string. Make sure that the '''def __repr__(self):''' line has the same indentation level as the __init__() function.
:7. Save the file lab7e.py and test it in an interactive Python shell:<source lang="bash">
[rchan@centos7 lab7]$ python3
10:51:01
</source>
::* Note: If you get different results, please troubleshoot your lab7dlab7f.py file and fix any discrepancy.
:3. Download the checking script and check your work. Enter the following commands from the bash shell.<source lang="bash">
cd ~/ops435/lab7/
python3 ./CheckLab7.py -f -v lab7f
</source>
:4. Before proceeding, make certain that you identify all errors in lab7alab7f.py. When the checking script tells you everything is OK - proceed to the next step.
= Investigation III - Objects and Scope =
:'''Files to be submitted individually to Blackboard:'''
:: Name the output of <code>./CheckLab7.py -f -v </code> as lab7_[seneca_id].txt
:: Python script files for this lab: lab7a.py, lab7b.py, lab7c.py, lab7d.py, lab7e.py, and lab7dlab7f.py.
=Lab Review=
1,760
edits

Navigation menu