Update page 'Day 3 homework'

j
2023-06-08 02:45:44 +02:00
parent 56e53911b6
commit 2756f093bb
+4
@@ -22,6 +22,10 @@ class BoundedInt():
self.max = max
```
Once the template is created, the homework assignment is to commit a BoundedInt.py file to the repository containing the code you have as of step 9 (or 10 if you do the extra credit). You don't need to submit the intermediate code for the other steps, only the final BoundedInt.py.
Please do not interpret the below list as a list of questions, it's a sequence of procedures that should guide you to the objective above.
1. Read this: https://docs.python.org/3/reference/datamodel.html?highlight=__int__#object.__int__
2. Modify the template to pass test 1, which checks that `int()` called on your class will return the value of `i`.
3. Read this, and the paragraph below it: https://docs.python.org/3/reference/datamodel.html?highlight=__int__#object.__add__