fork(1) download
  1. def calculatror(N):
  2. if N % 2 == 0:
  3. result = 1
  4. for i in range(1, N):
  5. result = result * i
  6. else:
  7. result = 0
  8. for i in range(1, N):
  9. result = result + i
  10.  
  11. return result
  12.  
  13. print(calculator(11))
Runtime error #stdin #stdout #stderr 0s 23296KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 13, in <module>
NameError: name 'calculator' is not defined