Files

Edit Download
<pl-question-panel>
  <p>This is a workspace question that launches a version of VS Code directly in the browser. Use the "Open workspace" button below to open VS Code.</p>

  <p>
    The Fibonacci numbers are 1, 1, 2, 3, 5, 8, ..., where each
    number is the sum of the two before it. These are numbered $F_1, F_2, \ldots$, and
    \[
    F_n = F_{n-1} + F_{n-2}.
    \]
  </p>

  <p>
    In the file <code>fibonacci.py</code> in the VS Code workspace, write a Python function <code>fib</code> that takes a number <code>n</code>
    and returns the n<sup>th</sup> Fibonacci number, $F_n$.
  </p>

  <p>Your code snippet should define the following variables:</p>
  <pl-external-grader-variables params-name="names_from_user">
    <pl-variable name="fib" type="python function">Function to compute the $n^\text{th}$ Fibonacci number</pl-variable>
  </pl-external-grader-variables>

  <pl-workspace></pl-workspace>
</pl-question-panel>

<pl-submission-panel>
  <pl-external-grader-results></pl-external-grader-results>
  <pl-file-preview></pl-file-preview>
</pl-submission-panel>