circuitpython/tests/micropython/native_while.py

14 lines
128 B
Python

# test native while loop
@micropython.native
def f(n):
i = 0
while i < n:
print(i)
i += 1
f(2)
f(4)