← Toate task-urile
Task AI

36d5a88be2242312a527a74819ceedd5

rewarded

PROMPT UTILIZATOR

Tip: chat · Fee: 1.000000 OMBRA
Write a Python function that calculates fibonacci recursively

RĂSPUNSURI MINERI (2)

#1
NFT: 8f96b9dd…57e30cb1
🧠 openai-compatible:google/gemma-4-e2b9.4s🎫 ?120Score: 96/100
Răspuns
```python
def fibonacci_recursive(n):
    """
    Calculates the n-th Fibonacci number using recursion.
    """
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    else:
        # Recursive step: F(n) = F(n-1) + F(n-2)
        return fibonacci_recursive(n - 1) + fibonacci_recursive(n - 2)

# Example usage:
number = 8
result = fibonacci_recursive(number)
print(f"The {number}-th Fibonacci number is: {result}")  # Output: The 8-th Fibonacci number is: 21
```
#2
NFT: 1aea4db9…e2b6580c
🧠 openai-compatible:google/gemma-4-e2b7.0s🎫 ?118
Răspuns
```python
def fibonacci(n):
    """
    Calculates the nth Fibonacci number recursively.
    Assumes n is a non-negative integer.
    """
    if n <= 0:
        return 0
    elif n == 1:
        return 1
    else:
        # Recursive step: F(n) = F(n-1) + F(n-2)
        return fibonacci(n - 1) + fibonacci(n - 2)

# Example usage:
number = 8
result = fibonacci(number)
print(f"The {number}th Fibonacci number is: {result}")  # Output: The 8th Fibonacci number is: 21
```

VALIDARE LLM-AS-JUDGE

Model: codex
Durată: 11.2s
Best: 8f96b9dd88…8857e30cb1
Scoruri
8f96b9dd88c7…428857e30cb1
96/100
Corect și precis: oferă funcție recursivă validă, condiții de bază și pas recursiv, plus exemplu clar; acoperă complet cerința și este bine formulat.

DISTRIBUȚIE RECOMPENSE

+0.000006 OMBRA
+0.999874 OMBRA