python 福利彩票_使用Python买福彩,5个数字,20选5,有没买过
import random,sys,os
num = random.sample(range(1,21),5)
print(num)
f=open("haha.txt","a+")
f.write(str(num)+"\n")
f.close()
person1 = int(input('请输入你要买的数字:'))
person2 = int(input('请输入你要买的数字:'))
person3 = int(input('请输入你要买的数字:'))
person4 = int(input('请输入你要买的数字:'))
person5 = int(input('请输入你要买的数字:'))
if person1 > 20 or person2 > 20 or person3 > 20 or person4 > 20 or person5 > 20:
print("不能输入大于20的数字")
sys.exit()
if person1 == person2 or person1 == person3 or person1 == person4 or person1 == person5 or person2 == person3 or person2 == person4 or person2 == person5 or person3 == person4 or person3 == person5 or person4 == person5:
print("不能购买重复的号码")
sys.exit()
if person2 in num and person3 in num and person4 in num and person5 in num and person1 in num:
print("恭喜你,全中了,奖励320元")
if person1 in num:
if person2 not in num and person3 not in num and person4 not in num and person5 not in num:
print("中了一个,很遗憾没奖励")
if person2 in num and person3 not in num and person4 not in num and person5 not in num:
print("中了两个,很遗憾没奖励")
if person2 in num and person3 in num and person4 not in num and person5 not in num:
print("中三个,很遗憾没奖励")
if person2 in num and person3 in num and person4 in num and person5 not in num:
print("中四个,很遗憾没奖励")
if person2 in num:
if person1 not in num and person3 not in num and person4 not in num and person5 not in num:
print("中了一个,很遗憾没奖励")
if person1 in num and person3 not in num and person4 not in num and person5 not in num:
print("中了两个,很遗憾没奖励")
if person1 in num and person3 in num and person4 not in num and person5 not in num:
print("中三个,很遗憾没奖励")
if person1 in num and person3 in num and person4 in num and person5 not in num:
print("中四个,很遗憾没奖励")
if person3 in num:
if person1 not in num and person2 not in num and person4 not in num and person5 not in num:
print("中了一个,很遗憾没奖励")
if person1 in num and person2 not in num and person4 not in num and person5 not in num:
print("中了两个,很遗憾没奖励")
if person1 in num and person2 in num and person4 not in num and person5 not in num:
print("中三个,很遗憾没奖励")
if person1 in num and person2 in num and person4 in num and person5 not in num:
print("中四个,很遗憾没奖励")
if person4 in num:
if person1 not in num and person2 not in num and person3 not in num and person5 not in num:
print("中了一个,很遗憾没奖励")
if person1 in num and person2 not in num and person3 not in num and person5 not in num:
print("中了两个,很遗憾没奖励")
if person1 in num and person2 in num and person3 not in num and person5 not in num:
print("中三个,很遗憾没奖励")
if person1 in num and person2 in num and person3 in num and person5 not in num:
print("中四个,很遗憾没奖励")
if person5 in num:
if person1 not in num and person2 not in num and person3 not in num and person4 not in num:
print("中了一个,很遗憾没奖励")
if person1 in num and person2 not in num and person3 not in num and person4 not in num:
print("中了两个,很遗憾没奖励")
if person1 in num and person2 in num and person3 not in num and person4 not in num:
print("中三个,很遗憾没奖励")
if person1 in num and person2 in num and person3 in num and person4 not in num:
print("中四个,很遗憾没奖励")
if person1 not in num and person2 not in num and person3 not in num and person4 not in num and person5 not in num:
print("不好意思,一个都没中,要加油哦")
python 福利彩票_使用Python买福彩,5个数字,20选5,有没买过相关推荐
- 第一章 第一节:Python基础_认识Python
Python基础入门(全套保姆级教程) 第一章 第一节:Python基础_认识Python 1. 什么是编程 通俗易懂,编程就是用代码编写程序,编写程序有很多种办法,像c语言,javaPython语言 ...
- python幂指数_幂指数 python
广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! "**"运算这个"**"比较简单,就是标 ...
- java python算法_用Python,Java和C ++示例解释的排序算法
java python算法 什么是排序算法? (What is a Sorting Algorithm?) Sorting algorithms are a set of instructions t ...
- python 标准差_标准差python
广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 方差是每个值与均值的差值的平方的平均值,标准差是方差的平方根(这是有用的,因为取 ...
- excel python插件_利用 Python 插件 xlwings 读写 Excel
Python 通过 xlwings 读取 Excel 数据 去年底公司让我做设备管理,多次委婉拒绝,最终还是做了.其实我比较喜欢技术.做管理后发现现场没有停机率统计,而原始数据有,每次要自己在Exce ...
- 网络安全用python吗_使用Python进行网络安全渗透——密码攻击测试器
相关文章: 本篇将会涉及: HTTP 基本认证 对HTTP Basic认证进行密码暴力攻击测试 什么是HTTP 基本认证 HTTP基本认证(HTTP Basic Authentication)是HTT ...
- python求和_用python求和
广告关闭 腾讯云11.11云上盛惠 ,精选热门产品助力上云,云服务器首年88元起,买的越多返的越多,最高返5000元! 我正在计算一个求和级数. 我有一个有值的表(见下文)a_(ij),并且p = 1 ...
- 动态照片墙 python 实现_利用python生成照片墙的示例代码
这篇文章主要介绍了利用python生成照片墙的示例代码,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧 PIL(Python Im ...
- python字符串_(Python基础教程之七)Python字符串操作
Python基础教程 在SublimeEditor中配置Python环境 Python代码中添加注释 Python中的变量的使用 Python中的数据类型 Python中的关键字 Python字符串操 ...
最新文章
- 华为于璠:新一代AI开源计算框架MindSpore的前世与今生 | AI ProCon 2019
- Python 学习笔记(3)对txt文件的读与写操作(下)
- Java中的enum枚举类
- 基于LSTM的序列预测: 飞机月流量预测
- 五、Kafka 用户日志上报实时统计之应用概述
- 安装提示卸载office_office2010 卸载工具
- 双11猫晚直播:看阿里文娱如何“擒住”高并发、多视角、低卡顿!
- Matlab之semilogx、semilogx、loglog函数
- 英国正在大举进军AI,看懂其三大投资走向
- 笔记本(只有一个HDMI接口)接双屏的方案(谨慎使用)
- 空气净化器哪个牌子好,除甲醛空气净化器什么牌子好推荐
- eclipse快捷键的设置和使用
- 【读图】钢铁侠 Elon Musk 的传奇人生
- 图像去雾毕业论文准备01-python中time标准库
- Android UI控件和布局
- Linux TCP在3.18内核引入的一个慢启动相关的问题或者说Bug
- 平面波导型光分路器行业调研报告 - 市场现状分析与发展前景预测
- React 学习笔记
- 我国各省市县的名称列表
- soi cmos技术及其应用_投屏技术及其教学应用
热门文章
- c语言程序中的注释必须单独占一行,C语言习题第一章
- linux 合计文件大小,linux下对符合条件的文件大小和行数做汇总统计的简单命令...
- java 转换成时间戳_Java 实例 – 时间戳转换成时间 - Java 基础教程
- opencv用java完成的例子_SpringBoot整合OpenCV的实现示例
- php ajax邮箱,PHP+Ajax异步通讯实现用户名邮箱验证是否已注册( 2种方法实现)
- IDA的函数操作,与导航操作;
- Python内置函数大全
- Python:3种方式实现随机生成8位字符
- Python中按值来获取指定键的两种方法
- 19道Python练习题