fork download
  1. # Write your code here
  2. n = int(input())
  3. While (n != 6):
  4. if n == 1:
  5. a = int(input())
  6. b = int(input())
  7. print(a+b)
  8. elif n == 2:
  9. a = int(input())
  10. b = int(input())
  11. print(a-b)
  12. elif n == 3:
  13. a = int(input())
  14. b = int(input())
  15. print(a*b)
  16. elif n == 4:
  17. a = int(input())
  18. b = int(input())
  19. print(int(a/b))
  20. elif n == 5:
  21. a = int(input())
  22. b = int(input())
  23. print(a%b)
  24. else:
  25. print("Invalid Operation")
  26. n = int(input())
  27.  
  28.  
Compilation error #stdin compilation error #stdout 0.02s 9308KB
stdin
3
1
2
4
4
2
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.7/py_compile.py", line 143, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 791, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "./prog.py", line 3
    While (n != 6):
                  ^
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.7/py_compile.py", line 147, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 3
    While (n != 6):
                  ^
SyntaxError: invalid syntax

stdout
Standard output is empty