![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习记录
没有感情的robot
这个作者很懒,什么都没留下…
展开
-
python 生成 exe文件
【代码】python 生成 exe文件。原创 2024-05-20 14:23:28 · 213 阅读 · 0 评论 -
python 使用MD5
python Md5原创 2024-05-11 16:16:52 · 323 阅读 · 1 评论 -
python多线程验证抽奖概率
【代码】python多线程验证抽奖概率。原创 2023-02-21 14:13:45 · 91 阅读 · 0 评论 -
抽奖概率通过接口进行验证
最近公司要上一个抽奖的功能,需要验证概率的准确性, 通过调用接口对概率进行验证python中的requests库对于接口请求非常方便具体实现首先定义一个空的字典 list,和总次数list = {}num = 100000请求抽奖的接口,并将返回的数据存储起来def lottery_test(): url = "xxx" headers = { 'Authorization': 'xxx' } for i in range(num):原创 2022-01-08 14:52:49 · 408 阅读 · 0 评论 -
python初学:石头剪刀布 游戏
猜拳判断:用户可输入任意字符,当不是0,1,2时 程序会提示重新输入,直到输入内容是0,1,2为止。import randoma = [0,1,2]cpt = random.randint(0,2)while True: your = input("请输入:剪刀(0)、石头(1)、布(2): ") if your in str(a): print("你输入的数为: ", your) print("随机数为: ", cpt) if in原创 2020-09-05 10:50:28 · 218 阅读 · 0 评论