You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Define a function <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">derivative</span></code> in <codeclass="file docutils literal notranslate"><spanclass="pre">polynomial.py</span></code> which takes a
918
+
<p>Define a function <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">derivative</span></code> in <codeclass="file docutils literal notranslate"><spanclass="pre">polynomials.py</span></code> which takes a
919
919
<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Polynomial</span></code> and returns a new <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Polynomial</span></code> which is its
920
920
derivative. Also define a <codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">dx()</span></code> method on the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Polynomial</span></code> class
921
921
which returns the derivative of that <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Polynomial</span></code>. Rather than
<p>Obtain the <aclass="reference internal" href="not_released.html"><spanclass="doc">skeleton code for these exercises from GitHub classroom</span></a>.</p>
1143
+
<p>Obtain the <aclass="reference external" href="https://classroom.github.com/a/eHigwP_C">skeleton code for these exercises from GitHub classroom</a>. You will also need to install the pytest-timeout package.</p>
<p>In this week’s skeleton repository, create a <aclass="reference internal" href="2_programs_in_files.html#term-package"><spanclass="xref std std-term">package</span></a> called
1151
1151
<codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">adt_examples</span></code> with a <aclass="reference internal" href="2_programs_in_files.html#term-module"><spanclass="xref std std-term">module</span></a> called
1152
-
<codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">adt_examples.fibonacci</span></code>. Create a class <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Fib</span></code> implementing the
1153
-
iterator protocol which returns the Fibonacci numbers. In other words, the
1154
-
following code should print the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Fibonacci</span></code> numbers under 100:</p>
1152
+
<codeclass="xref py py-mod docutils literal notranslate"><spanclass="pre">adt_examples.fibonacci</span></code>. Make the package installable and install in
1153
+
editable mode. Create a class <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Fib</span></code> implementing the iterator
1154
+
protocol which returns the Fibonacci numbers. In other words, the following
1155
+
code should print the <codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">Fibonacci</span></code> numbers under 100:</p>
iteration should fail if <spanclass="math notranslate nohighlight">\(n\)</span> exceeds a user-specified number of
742
742
iterations.</p>
743
743
<p>The skeleton code for this week contains a function
744
-
<codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">nonlinear_solvers.solvers.newton-raphson()</span></code> which takes as arguments a
744
+
<codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">nonlinear_solvers.solvers.newton_raphson()</span></code> which takes as arguments a
745
745
function, its derivative and a starting point for the iteration. It can also
746
746
optionally be passed a value for <spanclass="math notranslate nohighlight">\(\epsilon\)</span> and a maximum number of
747
747
iterations to execute. Implement this function. If the iteration succeeds
0 commit comments