fork(6) download
  1. n = 23
  2. r = True
  3.  
  4. while running:
  5. guess = int(input('Введите целое число : '))
  6.  
  7. if guess == number :
  8. print('Поздравляю, вы угадали.')
  9. r = False # это останавливает цикл while
  10. elif guess < n:
  11. print('Нет, загаданное число больше этого')
  12. else:
  13. print('Нет, загаданное число меньше этого.')
  14. else:
  15. print('Цикл while закончен.') # Здесь можете выполнить всё что вам ещё нужно
  16. print('Завершение.')
  17.  
Compilation error #stdin compilation error #stdout 0.02s 27712KB
stdin
1
2
10
42
11
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 7
    if guess == number :
                       ^
IndentationError: unindent does not match any outer indentation level

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: Sorry: IndentationError: unindent does not match any outer indentation level (prog.py, line 7)
stdout
Standard output is empty