Explore my coding problems, solutions, and experiments in Python. Each challenge is a step toward innovation.
def fibonacci(n):
a, b = 0, 1
for _ in range(n):
print(a, end=" ")
a, b = b, a + b
fibonacci(10)
def factorial(n):
if n == 0:
return 1
return n * factorial(n-1)
print(factorial(5))
def reverse_string(s):
return s[::-1]
print(reverse_string("Arfan"))