def factorial(n):
result = 1
for y in range(1, n):
result *= y
return result
for n in range(0,10):
print(n, factorial(n+1))
La plataforma me lo valida como incorrecto
La orden del encabezado es la siguiente:
Fill in the blanks to make the factorial function return the factorial of n. Then, print the first 10 factorials (from 0 to 9) with the corresponding number. Remember that the factorial of a number is defined as the product of an integer and all integers before it. For example, the factorial of five (5!) is equal to 1*2*3*4*5=120. Also recall that the factorial of zero (0!) is equal to 1.
Me ayudan?
