-4
我最近開始學習Python。我無法糾正此錯誤:語法錯誤Python:意外縮進
import pygame, sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((400, 300))
pygame.display.set_caption('Hello World!')
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
我得到那個說
unexpected indent
我投票關閉這個問題進行摘因爲它不是英文 – smirkingman
僅供參考:http://pt.stackoverflow.com –
正如錯誤消息所述,您的代碼沒有正確縮進。您應該將錯誤消息作爲文本放入問題中,而不是作爲鏈接的圖像。 –