Project Files
main.py
utils.py
config.json
assets
Storage
15% used
main.py
# Welcome to CodeNebula!
# This is a Python code editor with real-time execution
def fibonacci(n):
"""Generate Fibonacci sequence up to n terms"""
a, b = 0, 1
for _ in range(n):
yield a
a, b = b, a + b
# Print first 10 Fibonacci numbers
for num in fibonacci(10):
print(num)
# Try running this code!
# Click the Run button above or press Ctrl+Enter
Output
>> Running main.py
0
1
1
2
3
5
8
13
21
34
>> Program finished with exit code 0