安装时,看有人会建议勾选第一个for all user 的选项,有什么影响吗
class Student: def __int__(self,name,score): self.name = name self.score = score def say_score(self): self.age = 18 print("{0}的分数是{1}".format(self.name,self.score)) s1 = Student("张三",80) s1.say_score() print(s1.age) s1.salary = 3000 print(s1.name,s1.score)
为什么这里不接受参数
提取t,工具解析失败了
提取t,然后工具解析失败了,
没别的老师了吗,大部分都是这个老师讲,主要他每次讲课都是想到啥说啥,还讲点黑话,也不解释原理,听的我云里雾里的
xory
x为false,怎么会直接返回y?不是也要计算y,y为true则返回True,y为false则返回False吗?
屏幕截图 2023-11-29 233501.png
老师你好,我和这位同学的问题一样,找不到这个包,但是我从Project Interpreter里加号自行安装了这个包,并且又在这个项目的环境变量里添加了这个路径,还是不能编译成功然后运行,但是我直接双击turtle这个脚本文件就可以出现刚刚实现的代码。
老师,这个文件是不用自己动手创建的吗?输入代码自动创建吗?
ERROR TypeError: AutoImport is not a function启动不了
默认是d盘要改为c盘吗
启动后提示TypeError: AutoImport is not a function咋办
为什么我的没有颜色
class Person: def __int__(self,name,age): print("创建Person") self.name=name self.age=age def say_age(self): print("{0}的年龄{1}".format(self.name,self.age)) class Student(Person): pass s1=Student("高淇",18) s1.say_age()
报错了
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 ():
为什么边界这卡不住 老师!?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637