Post
Python
How to resolve the error indentationError: unindent does not match any outer indentation level?
I don’t know why I am seeing this error please help me here is my code:
import sys
def factorial(x): # Return factorial
res = 1
for j in range (1,x):
res = res * j
print "factorial is ",res
return res
Posted on 25th April 2024
Try this
import sys
def factorial(x): # return factorial
result = 1
for j in range (1,x):
res = res * j
print "factorial is ",res
return res
print Factorial(5)
STILL GOT QUERIES?