# # Compute the value of n-factorial for a value entered by the user using a # for loop. # # # Read the value of n from the user. # n = int(input("Enter a non-negative integer: ")) # # Initialize result. # result = 1 # # For each value in a collection of integers from 1 up to and including n... # for i in range(1, n + 1): # Multiply the result so far by the current number, storing the outcome back # into result. result = result * i # # Display the result. # print(f"{n}-factorial is equal to {result}.")