codeAdded 2026-05-17

Explain a recursive function in plain English

Last tested against claude-opus-4-7Pass (8/9)

Model scores over time

ModelTrendLatest scorePassLast tested
Claude Opus 4.78/9Pass2026-05-23
Claude Sonnet 4.69/9Pass2026-05-23
GPT-4o6/9Fail2026-05-23
Gemini 2.5 Pro9/9Pass2026-05-23

Rubric

Each criterion scored 0โ€“3. Pass threshold: 7/9.

  • 1.Identifies the base case correctly
  • 2.Explains the recursion without using the word recursion unnecessarily
  • 3.Output is plain English with no code in the response

Latest outputs โ€” run 2026-05-23

Last tested against claude-opus-4-7Pass (8/9)
Prompt
Here is a recursive function:
```
{{code}}
```
Explain in plain English what it does and what its base case is.
Test input: code: def fib(n): return n if n<2 else fib(n-1)+fib(n-2)
OutputClaude Opus 4.7

This function computes Fibonacci numbers. Its base cases are n=0 and n=1 โ€” for those it returns n directly. For any larger number, it adds the results of two smaller versions of itself, working recursively down until both reach a base case.

1: 3/32: 2/33: 3/3
Last tested against claude-sonnet-4-6Pass (9/9)
Prompt
Here is a recursive function:
```
{{code}}
```
Explain in plain English what it does and what its base case is.
Test input: code: def fib(n): return n if n<2 else fib(n-1)+fib(n-2)
OutputClaude Sonnet 4.6

This function calculates the nth Fibonacci number. The base case is n < 2 โ€” returning 0 or 1 directly. For any larger n, it adds the two preceding Fibonacci values by calling itself with n-1 and n-2, continuing until both chains hit a base case.

1: 3/32: 3/33: 3/3
Last tested against gpt-4oFail (6/9)
Prompt
Here is a recursive function:
```
{{code}}
```
Explain in plain English what it does and what its base case is.
Test input: code: def fib(n): return n if n<2 else fib(n-1)+fib(n-2)
OutputGPT-4o

This function computes Fibonacci numbers using recursion. The base case (n < 2) returns n directly โ€” 0 for n=0 and 1 for n=1. For any n>=2, it calls itself with n-1 and n-2, adding the results. It works by breaking the problem down repeatedly until reaching the base case.

1: 3/32: 1/33: 2/3
Last tested against gemini-2.5-proPass (9/9)
Prompt
Here is a recursive function:
```
{{code}}
```
Explain in plain English what it does and what its base case is.
Test input: code: def fib(n): return n if n<2 else fib(n-1)+fib(n-2)
OutputGemini 2.5 Pro

This function finds Fibonacci numbers. It stops when n is 0 or 1 โ€” those are the base cases โ€” and returns n directly. For anything larger, it adds together the results of two calls with smaller inputs, building the answer from the smallest possible cases upward.

1: 3/32: 3/33: 3/3