- 博客(5)
- 收藏
- 关注
原创 模拟乒乓球比赛
print(f"球员1获胜了{wins_p1}次,获胜概率为:{prob_p1_win:.2%}")print(f"球员2获胜了{wins_p2}次,获胜概率为:{prob_p2_win:.2%}")player1_ability = int(input("请输入球员1的能力值: "))player2_ability = int(input("请输入球员2的能力值: "))num_matches = int(input("请输入模拟比赛的次数: ")):return: 球员1和球员2的获胜次数。
2024-05-27 19:48:31
367
原创 统计西游记中人物出场频率前20
txt = open("西游记.txt","r",encoding = 'utf-8').read()elif word == "孙猴子" or word == "孙悟空"
2024-05-27 19:03:25
318
原创 第五题,写了一个小游戏
print_text(screen, font2, (SCREEN_WIDTH - fwidth) // 2, (SCREEN_HEIGHT - fheight) // 2, winner.Name + '获胜',print_text(screen, font2, (SCREEN_WIDTH - fwidth) // 2, (SCREEN_HEIGHT - fheight) // 2, winner.Name + '获胜',
2024-05-27 18:40:57
388
原创 31张翔的读书报告
这种工具可用来存储和处理大型矩阵,比Python自身的嵌套列表(nested list structure)结构要高效的多(该结构也可以用来表示矩阵(matrix)),支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。scipy是基于numpy的一个科学计算库,它提供了更多的高级函数和模块,涵盖了优化,积分,插值,傅里叶变换,信号处理,图像处理,常微分方程等领域。matplotlib.pyplot.plot():绘制折线图。matplotlib.pyplot.hist():绘制柱状图。
2024-05-27 18:38:59
275
原创 7段数码管绘制
turtle.write('年', font=("Arial", 18, "normal"))turtle.write('月', font=("Arial", 18, "normal"))turtle.write('日', font=("Arial", 18, "normal"))turtle.write('时', font=("Arial", 18, "normal"))
2024-04-27 16:35:46
617
1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人