저는 일반적으로 파이썬과 프로그래밍에 익숙하지 않습니다. 나는 College on Summer Term에 앞장서려고 노력하고있어. 나는이 초급 책에서 배우려고 노력하고 있으며, 다음 코드를 정확히 쓴다. 나는 어느 방향 으로든 들여 쓰기 공간을 변경하려고 시도했지만 여전히이 메시지를 얻는다. 나는 아마 내가 여기에 뭔가를 놓쳤다는 것을 이해하지만 나는 어떻게해야하는지에 대한 조언을 고맙게 생각할 것이다.들여 쓰기가 새롭고 들러 붙음 오류 : 들여 쓰기 된 블록이 예상 됨
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)]
>>> # Ghost Game
... from random import randint
>>> print('Ghost Game')
Ghost Game
>>> feeling_brave = True
>>> score = 0
>>> while feeling_brave:
... ghost_door = randint(1, 3)
File "<stdin>", line 2
ghost_door = randint(1, 3)
^
IndentationError: expected an indented block
>>> ghost_door= randint(1, 3)
>>> while feeling_brave:
... ghost_door= randint(1, 3)
File "<stdin>", line 2
ghost_door= randint(1, 3)
^
IndentationError: expected an indented block
>>> while feeling_brave:
... ghost_door = randint(1, 3)
File "<stdin>", line 2
ghost_door = randint(1, 3)
^
IndentationError: expected an indented block
>>> while feeling_brave:
... ghost_door = randint(1,3)
File "<stdin>", line 2
ghost_door = randint(1,3)
^
IndentationError: expected an indented block
>>> while feeling_brave:
... ghost_door =randint(1,3)
File "<stdin>", line 2
ghost_door =randint(1,3)
들으십시오. 들여 쓰기를 수정하십시오 (Google에서 알 수없는 방법을 모르면) –
들여 쓰기 만하면됩니다. 'ghost_door'에 들여 쓰기 만하면됩니다. 오류가 마치라고 말했듯이 – kstullich
그래서 나는 그것을 이해하기 때문에 'g'앞에 들여 쓰기를 할 수 있습니까? 미안 해요, 여전히 레이아웃을 이해하려고합니다. – Joseph