Respuesta :
the function and loop will be
def factorial(x):
total = 1
if x != 1 and x != 0:
for i in range(x,1,-1):
total *= i
return total
The program is an illustration of loops
Loops are program statements that are used to perform repeated operations
The program in python, where comments are used to explain each line is as follows:
#This gets input for N
N = int(input())
#This initializes factorial to 1
factorial = 1
#This opens the while loop
while N >1:
#This calculates the factorial
factorial*=N
N-=1
#This prints the factorial
print(factorial)
Read more about loops at:
https://brainly.com/question/14284157