Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
One possible program:
def factorial(n):
result = 1
for i in range(1, n + 1):
result *= i
return result
print(factorial(5))