老师,我创建了一个a包,但是运行的时候说没有a包,这个应该怎么解决
import a.aa.module_AA a.aa.module_AA.add(10, 20)
f = open(r"d:\a.txt","a") f.write("hello world!!!") f.close()
老师,为什么我的代码打不开老师的这个页面呀
不理解.png
老师,我不明白,为什么我这个会有这个错误啊,代码是一样的
为什么这样子
import os import os.path n =0 def diguiwenjian(path): global n print("\t"*n+path) file_list = os.listdir(path) for file_path2 in file_list: path3 = os.path.join(path,file_path2) if os.path.isdir(path3): n +=1 diguiwenjian(path3) else: print("\t"*(n+1)+path3) n -=1
我这个行吗 用的时候参数就输入路径
老师,这里的
MainGame.my_bullet_list.remove(my_bullet)
中的remove会不会与
MainGame.my_tank.remove = True
冲突
这个怎么解决呀
这是什么问题啊
屏幕截图 2024-10-14 123212.png
这个
self.images = {
'U':pygame.image.load('./img/p1tankU.gif'),
'D':pygame.image.load('./img/p1tankD.gif'),
'L':pygame.image.load('./img/p1tankL.gif'),
'R':pygame.image.load('./img/p1tankR.gif'),
} 为什么要用self.images,images又不是实例化的方法
.direction == : .rect.left = tank.rect.left - .rect.width .rect.top = tank.rect.top + tank.rect.height/- .rect.height/.direction == : .rect.left = tank.rect.left + tank.rect.width .rect.top = tank.rect.top + tank.rect.height/- .rect.height/.direction == : .rect.left = tank.rect.left + tank.rect.width/- .rect.width/.rect.top = tank.rect.top - .rect.height .direction == : .rect.left = tank.rect.left + tank.rect.width/- .rect.width/.rect.top = tank.rect.top + tank.rect.height
这一部分中的self.rect.left, self.rect.top, tank. rect.top, tank.rect.left,
self.rect.width, self.rect.height是怎么来的呀,上面好像没有定义呀
这里开始的章节都要用到vsc和pycharm的虚拟环境吗
老师,为什么主类方法格式是(self)->None:
而坦克类方法格式是(self):
这个安装不上
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637