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
:'''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