Why this is giving syntax error , on all other compiler its working fine

def factorial(n):
if n < 0:
return 0
elif n == 0 or n == 1:
return 1
else:
fact = 1
while(n > 1):
fact *= n
n -= 1
return fact

num=int(input())
print(factorial(num))

@vivekthakur8102000
Can you send it on ide because I think the indentation is a bit flawed

@vivekthakur8102000
Also try using the concept of string multiplication to solve the question using C++

okay i will send u https://ide.codingblocks.com/

@vivekthakur8102000
There is no code in the link

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.