MCPcopy Create free account
hub / github.com/vercel/examples / _fibonacci_number

Function _fibonacci_number

python/celery/worker/tasks.py:10–16  ·  view source on GitHub ↗
(n: int)

Source from the content-addressed store, hash-verified

8
9
10def _fibonacci_number(n: int) -> int:
11 if n <= 1:
12 return n
13 a, b = 0, 1
14 for _ in range(2, n + 1):
15 a, b = b, a + b
16 return b
17
18
19@app.task(queue=QUEUE_NAME, name="worker.tasks.calculate_fibonacci")

Callers 1

calculate_fibonacciFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected