为什么Python运行不了
import pygameimport sysfrom ***.locals import *from random import randint size = w,h = 600,400fish1_speed = [randint(1,10),randint(1,10)]fish2_speed = [randint(1,10),randint(1,10)]fish3_speed = [randint(1,10),randint(1,10)] class main: def __init__(self,size): ***.init() ***.screen = pygame.***.set_mode(size) pygame.***.set_caption("Hello,this is the game:turtle eat fish") ***.bg = (210,210,210) def run_game(self): while True: for events in python.***.get(): if ***.type == ***.quit: ***.exit() self.***.fill(***.bg) pygame.***.flip() if __name__ == "__main__": setgo = main(size) ***.run_game()运行不了也保存不了
程序有多个错,改好的(我测试正常运行,但你要安装pygame库)
运行结果