摘要: print("徐嘉俊32") import jieba txt = open("E:\\大学\\Python\\西游记.txt","r",encoding='gb18030').read() words = jieba.lcut(txt) counts = {} for word in words: 阅读全文
posted @ 2023-12-29 02:48 徐嘉俊 阅读(26) 评论(0) 推荐(0)
摘要: import sys import pygamepygame.init()size = width, height = 1000, 700screen = pygame.display.set_mode(size)color = (0, 0, 0)ball = pygame.image.load(" 阅读全文
posted @ 2023-12-29 02:45 徐嘉俊 阅读(41) 评论(0) 推荐(0)
摘要: import requestsurl = "https://www.google.cn/"for i in range(20):try:r = requests.get(url, timeout = 30)r.raise_for_status()r.encoding = 'utf-8'print(r 阅读全文
posted @ 2023-12-29 02:29 徐嘉俊 阅读(22) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-11-21 11:43 徐嘉俊 阅读(13) 评论(0) 推荐(0)
摘要: 使用Python中的math模块 使用python中的math模块 代码: 蒙特卡罗法 阅读全文
posted @ 2023-11-17 11:09 徐嘉俊 阅读(25) 评论(0) 推荐(0)
摘要: 03运行超市抹零结账行为 代码: money_all=56.75+72.91+88.5+26.37+68.51 money_all_str=str(money_all)print("商品总金额:"+money_all_str)money_real=int(money_all)money_real_s 阅读全文
posted @ 2023-11-01 10:34 徐嘉俊 阅读(18) 评论(0) 推荐(0)
摘要: 用python计算圆周率PI‪‬‪‬‪‬‪‬‪‬‮‬‪‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‫‬‫‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‮‬‪‬‪‬‪‬‪‬‪‬‮‬‪‬‭‬描述用python计算圆周率PI‪‬‪‬‪‬‪‬ 阅读全文
posted @ 2023-11-01 10:19 徐嘉俊 阅读(40) 评论(0) 推荐(0)