mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
Create loop.py
Update fib.py Create fib.py
This commit is contained in:
parent
f4248e25b1
commit
df1150382d
6
benchmarks/fib.py
Normal file
6
benchmarks/fib.py
Normal file
@ -0,0 +1,6 @@
|
||||
def fib(n):
|
||||
if n < 2:
|
||||
return n
|
||||
return fib(n-1) + fib(n-2)
|
||||
|
||||
assert fib(32) == 2178309
|
6
benchmarks/loop.py
Normal file
6
benchmarks/loop.py
Normal file
@ -0,0 +1,6 @@
|
||||
x = 0
|
||||
|
||||
for i in range(5000000):
|
||||
x += 1
|
||||
|
||||
assert x == 5000000
|
Loading…
x
Reference in New Issue
Block a user