@@ -462,7 +462,7 @@ user might type in order to recreate the object. For example::
462462
463463`type(self).__name__ ` simply evaluates to the class name, in this case
464464`Polynomial `. This is better than hard-coding the class name because, as we will
465- see in :numref: `week %s <inheritance >`, this implementation of
465+ see in :numref: `Chapter %s <inheritance >`, this implementation of
466466:meth: `~object.__repr__ ` might well end up being inherited by a class with a
467467different name. Notice that in order to help ensure consistency of
468468representations we call :func: `repr ` on the coefficients in this case, whereas
@@ -876,19 +876,27 @@ Glossary
876876Exercises
877877---------
878878
879- .. only :: html
879+ .. .. only:: html
880880
881- .. panels ::
882- :card: quiz shadow
881+ .. .. panels::
882+ .. :card: quiz shadow
883883
884- .. link-button :: https://bb.imperial.ac.uk/webapps/assessment/take/launchAssessment.jsp?course_id=_25965_1&content_id=_2054444_1
885- :text: This week's quiz
886- :classes: stretched-link
884+ .. .. link-button:: https://bb.imperial.ac.uk/webapps/assessment/take/launchAssessment.jsp?course_id=_25965_1&content_id=_2054444_1
885+ .. :text: This week's quiz
886+ .. :classes: stretched-link
887887
888+ .. only :: not book
888889
889- Obtain the `skeleton code for these exercises from GitHub Classroom <https://classroom.github.com/a/mElLR0AD >`__.
890- The skeleton code contains a :mod: `polynomial ` package with a version of
891- the :class: `Polynomial ` class.
890+ Using the information on the `book website
891+ <https://object-oriented-programming.github.io/edition1/exercises.html> `__
892+ obtain the skeleton code for these exercises. The skeleton code contains a
893+ :mod: `polynomial ` package with a version of the :class: `Polynomial ` class.
894+
895+ .. only :: book
896+
897+ Using the information on the `book website ` [#exercise_page ]_,
898+ obtain the skeleton code for these exercises. The skeleton code contains a
899+ :mod: `polynomial ` package with a version of the :class: `Polynomial ` class.
892900
893901.. proof :exercise ::
894902
@@ -909,15 +917,16 @@ the :class:`Polynomial` class.
909917
910918.. proof :exercise ::
911919
912- Define a function `derivative ` in :file: `polynomials.py ` which takes a
913- :class: `Polynomial ` and returns a new :class: `Polynomial ` which is its
914- derivative. Also define a :meth: `dx ` method on the :class: `Polynomial ` class
915- which returns the derivative of that :class: `Polynomial `. Rather than
916- duplicating code, you should implement the function by calling the method.
920+ Define a :meth: `dx ` method on the :class: `Polynomial ` class which returns a
921+ new :class: `Polynomial ` which is the derivative of that
922+ :class: `Polynomial `. Also define a function `derivative ` in
923+ :file: `polynomials.py ` which takes a :class: `Polynomial ` and returns its
924+ derivative. Rather than duplicating code, you should implement the function
925+ by calling the method.
917926
918927.. proof :exercise ::
919928
920- Inside the exercise repository for this week , create a new :mod: `shape `
929+ Inside the exercise repository, create a new :mod: `shape `
921930 package containing a :mod: `circle ` module.
922931
923932 1. Create a :class: `Circle ` class
@@ -945,7 +954,10 @@ the :class:`Polynomial` class.
945954 .. proof :exercise ::
946955
947956 Make the :mod: `circle ` and :mod: `polynomial ` packages installable. As with
948- last week 's exercise, pytest can't test this so you'll need to push to
957+ last chapter 's exercise, Pytest can't test this so you'll need to push to
949958 GitHub and check that the autograding tests pass there.
950959
951-
960+ .. rubric :: Footnotes
961+
962+ .. [#exercise_page ] `https://object-oriented-programming.github.io/edition1/exercises.html
963+ <https://object-oriented-programming.github.io/edition1/exercises.html> `__
0 commit comments