Predict the outputExercise 1/6Basic10 XP

Factorial

Task

Without running the program, write exactly what it prints.

def f(n):
if n == 0:
return 1
return n * f(n - 1)
​
print(f(4))

Your answer

Put each printed line on its own line.

Hints

Try it yourself first. Each hint reveals a little more - and lowers the reward a little.

Signed out, hints are free - but no XP is awarded either.

Solution

The solution unlocks after the last hint.