fork download
  1. num = int(input())
  2.  
  3. if num != 1 and num != 2:
  4. print('role error')
  5. break
  6.  
  7. else:
  8. score = int(input())
  9. if score>100 or score<0:
  10. print('score error')
  11. else:
  12. if num == 1 and score >=60:
  13. print('pass')
  14. elif num == 2 and score>=70:
  15. print('pass')
  16. else:
  17. print('fail')
Compilation error #stdin compilation error #stdout 0.03s 9776KB
stdin
3
59
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.9/py_compile.py", line 144, in compile
    code = loader.source_to_code(source_bytes, dfile or file,
  File "<frozen importlib._bootstrap_external>", line 918, in source_to_code
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "./prog.py", line 5
    break
    ^
SyntaxError: 'break' outside loop

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.9/py_compile.py", line 150, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 5
    	break
    	^
SyntaxError: 'break' outside loop

stdout
Standard output is empty