fork download
  1. a, b, c = input().split()
  2. A = int(a)
  3. B = int(b)
  4. C = int(c)
  5.  
  6. def mayor(A, B):
  7. return (((A+B+abs(A-B))/2)
  8.  
  9. def abs(x):
  10. if x < 0:
  11. return -1*x
  12. else:
  13. return x
  14.  
  15. def numeromayor(A, B, C):
  16. D=mayor(A,B)
  17. E=mayor(D,C)
  18. return E
  19.  
  20. print(str(numeromayor(a, b, c)) + " eh o maior")
Compilation error #stdin compilation error #stdout 0.02s 27704KB
stdin
3.0, 4.0, 5.2
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.5/py_compile.py", line 125, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "./prog.py", line 9
    def abs(x):
      ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/py_compile.py", line 129, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 9
    def abs(x):
      ^
SyntaxError: invalid syntax

stdout
Standard output is empty