Interactive tutorials and code snippets with dark-green theme.
Learn variables, data types, loops, and basic Python syntax.
Understand how to create and use Python functions effectively.
Learn Object-Oriented Programming concepts in Python.
# Example: Fibonacci sequence
def fibonacci(n):
a, b = 0, 1
for _ in range(n):
print(a, end=' ')
a, b = b, a + b
fibonacci(10)
# Example: Factorial using recursion
def factorial(n):
if n==0: return 1
return n * factorial(n-1)
print(factorial(5))