老师这个界面是按那些快捷键出现的,我打完代码并没有自动出现
老师怎么打字这么快ToT,怎么练出来的。还有这里的复制上一行的小技巧,是怎么做到的啊。
我们Java当中,对于字符集使ASCⅡ还使unicode 之前我记得课本当中我们,学习到的我记得好像是ASCⅡ,但是老师讲的使unicode。
证书问题解决不了,这部分内容很难进行下去
GIF2323.gif
运行pycharm 出现的问题,怎么解决?
为什么一个同样的值要储存于多个对象之中呢?这样有什么意义吗
还有像这样去判断是否调用一个同样的对象 这样做法又是为何呢?
请老师指教!
#老师我这改良版的,根据输入的页数来爬取多少页的 import requests from fake_useragent import UserAgent import re def test_re(): page = int(input('请输入您想要爬取网页的页数:')) offset = (page - 1) * 30 #设置url地址 url = f'https://www.maoyan.com/films?showType=3&offset={offset}' #设置请求头 headers = {'User-Agent':UserAgent().chrome} #发送请求 resp = requests.get(url,headers=headers) #解析数据 names = re.findall('<div class="channel-detail movie-item-title" title="(.+?)">',resp.text) scores =[ get_score(data) for data in re.findall('<div class="channel-detail channel-detail-orange">(.+?)</div>',resp.text)] #打印结果 for n,s in zip(names,scores): print(f'电影:{n} 评分:{s}') def get_score(data): if data != '暂无评分': data = '.'.join(re.findall('\d+',data)) return data if __name__ == '__main__': test_re()
老师,想问一下,我想把文字显示在图片上面应该怎么搞?
老师,为什么我的项目创建好了,里面不能写代码呢??
请问老师print方法 和println方法的作用是什么?只是为了计算正文的长度吗?
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 ():
为什么边界这卡不住 老师!?
我的docker是新版的(24),里面的配置文件好像不太一样,改了以后就是这样了
老师,我这个怎么回事
请问一下,老师的笔记在哪里呢?找也找不到
老师 为什么返回值是None呢?
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637