摘要: def printIntro(): print("这个程序模拟两个选手A和B的乒乓球比赛") print("程序运行需要A和B的能力值(以0到1之间的小数表示)") #获得程序运行参数def printInputs(): a = eval(input("请输入选手A的能力值(0-1): ")) b 阅读全文
posted @ 2021-11-13 23:17 徐韵晴 阅读(38) 评论(0) 推荐(0)
摘要: import jieba txt = open("D:\\西游记.txt", "r", encoding='gb18030').read()words = jieba.lcut(txt) # 使用精确模式对文本进行分词counts = {} # 通过键值对的形式存储词语及其出现的次数 for wor 阅读全文
posted @ 2021-11-13 23:15 徐韵晴 阅读(83) 评论(0) 推荐(0)
摘要: money_all=56.75+72.91+88.50+26.37+68.51money_all_str=str(money_all)print("商品总金额为:"+money_all_str)money_real=int(money_all)money_real_str=str(money_rea 阅读全文
posted @ 2021-09-14 00:24 徐韵晴 阅读(22) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-09-06 12:20 徐韵晴 阅读(17) 评论(0) 推荐(0)
摘要: 这周接触了python,我觉得python和c语言、数据结构有些相似也有些不同,python更简单化了但是python运用了非常多它们的基础。我们在学习python的过程中还要复习之前学习过的内容,不能把之前学的落下。老师讲的课生动明了,简单易懂,我要努力把python学透。 阅读全文
posted @ 2021-09-06 00:03 徐韵晴 阅读(40) 评论(0) 推荐(0)