为什么Python运行不了 - 爱问答

(爱问答)

为什么Python运行不了

import pygame
import sys
from ***.locals import *
from random import randint
 
size = w,h = 600,400
fish1_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库)

为什么Python运行不了

运行结果

为什么Python运行不了


下一篇:1、人对电脑的操作,是怎么转化成为机器语言的,机器就懂得0和1两种数字

上一篇:excel在A1里输入不同数值则B1中显示相应的字符

热门标签:
excel 网盘 破解 word dll
最新更新:
微软重新评估新的Outlook的使用时机 联想推出搭载联发科Helio G80芯片组的Tab M9平板 英特尔创新大赛时间确定! 微软Edge浏览器在稳定渠道中推出Workspaces功能 英伟达RTX4060TiGPU推出MaxSun动漫主题! 谷歌地图为用户提供了街景服务! GameSir 在T4 Kaleid中推出了一款出色的控制器! 微软开始在Windows 11 中测试其画图应用程序的新深色模式! LG电子推出全球首款无线OLED电视 英伟达人工智能芯片崭露头角! Steam Deck可以玩什么游戏-Steam Deck价格限时优惠 雷蛇推出CobraPro鼠标 Kindle电子阅读器可以访问谷歌商店吗 Windows10如何加入组策略 window10图片查看器怎么没有了?