Unit 2 Task 20 - Solution

Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.

Solution - Task 20: Factorial orderings

← Back to task


One possible program:

factorial_input = int(input("N: "))
result = 1

for factor in range(1, factorial_input + 1):
    result *= factor

print(factorial_input, "!=", result)