|
|
back to boardCommon BoardPython why answer is wrong? Posted by Artem 13 May 2019 00:12 #solution 1068 x=int(input("enter your number: ")) def factorial(x): if x>0: return x + factorial(x - 1) elif x<0: return x + factorial(x+1) if x==0: return 0 y=factorial(x) if x<0: print(y+1) else: print(y) |
|
|