You are viewing this question as it will appear in the manual grading interface. Return to the normal view when you are done.

Demo: Fibonacci function, file upload, manual grading

Note to grader: this student received the variant using an initial index of $1$.

Files

Correct answer

1
2
3
4
5
def fib(n):               # Note the function name
    a, b = 1, 1           # Variable names are not important
    for _ in range(2, n): # A recursive option is acceptable too
        a, b = b, a + b   # If the assignment is separate make sure the order doesn't change the result
    return b              # Make sure the returned value matches the order above

Student view placeholder

In student views this area is used for assessment and score info.
Tools

Staff information

Question

Title:
Demo: Fibonacci function, file upload, manual grading

Variant

Started at:
2026-08-04 22:50:34 (CDT)
Duration:
0s
Show/Hide answer
{}
History
dec frac
rad deg