import pygame

pygame.init()

screen = pygame.display.set_mode((600, 400)) pygame.display.set_caption("game")

running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False

pygame.quit()

根据我的注释写出python程序:导入pygame初始化pygame定义窗口screen大小为600400定义窗口名为game点击叉叉退出游戏

原文地址: http://www.cveoy.top/t/topic/h0TX 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录