新建一个文件,也没有导入这个模块进来,麻烦老师帮忙看一下什么问题啊
老师,问一下我这儿回车没撒没有提供的模板呢,跟视频老师讲解的不一样呢
==之前不能有空格。我装了指定版本了。
C:\Users\Mountain-tai>pip install pygame == 2.3.0
ERROR: Invalid requirement: '=='
这个版本装不上。
老师,这个怎么办?
老师这里的index作用是什么呀?
老师,请问一下:
except是只能捕捉第一个异常吗?
这里其实是float(a)出现异常略过'/float(b),print(c)'直接进入了except?这样的话修正了a才能捕捉到b,那有没有什么办法是能够一下捕捉到全部异常的?
麻烦老师帮我解答一下,谢谢老师!
老师,这是个怎么解决,我删过a.txt这个文件,现在就这样了
老师,这个文件是不用自己动手创建的吗?输入代码自动创建吗?
pygame _display = pygame.display color_black = pygame.Color() color_red = pygame.Color() version = maingame(): window = Screen_width = Screen_height = TANK_P1 = (): _display.init() maingame.window = _display.set_mode([maingame.Screen_widthmaingame.Screen_height]) maingame.TANK_P1 = Tank() _display.set_caption(+ version) .getTextSurface() : maingame.window.fill(color_black) .getEvent() maingame.window.blit(.getTextSurface(% )()) maingame.TANK_P1.displayTank() maingame.TANK_P1.move() _display.update() (): eventList = pygame.event.get() event eventList: event.type == pygame.QUIT: .endgame() event.type == pygame.KEYDOWN: event.key == pygame.K_LEFT: () maingame.TANK_P1.direction = event.key == pygame.K_RIGHT: () maingame.TANK_P1.direction = event.key == pygame.K_UP: () maingame.TANK_P1.direction = event.key == pygame.K_DOWN: () maingame.TANK_P1.direction = event.key == pygame.K_SPACE: () (text=): pygame.font.init() = pygame.font.get_fonts() font = pygame.font.SysFont() textSurface = font.render(textcolor_red) textSurface (fontList) (): () () Tank: TANK_P1 = (lefttop): .images = { : pygame.image.load(): pygame.image.load(): pygame.image.load(): pygame.image.load() } .direction = .image = .images[.direction] .rect = .image.get_rect() .rect.left = left .rect.top = top .speed = (): .image = .images[.direction] maingame.window.blit(.image.rect) (): .direction == : .rect.left > : .rect.left -= .speed .direction == : .rect.top > : .rect.top -= .speed .direction == : .rect.top + .rect.height < maingame.Screen_width: .rect.top += .speed .direction == : .rect.left + .rect.height < maingame.Screen_height: .rect.left += .speed ():
为什么边界这卡不住 老师!?
老师,我这个问题出在哪里呀?这种类似的bug怎么看呀?
坐标怎么看,哪里是原点,哪里是x轴,哪里是y轴
老师我这是什么问题
为什么加个rstrip就能把\n去掉
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637