赞
踩
- # 四位验证码
- code = ''
- for i in range(4):
- s = 'QWERTYUIOPASDFGHJKLZCXVBNMqwertyuioplkjhgfdsazxcvbnm123456789'
- words = random.randint(0, len(s) - 1)
- code +=s[words]
-
- print("您的验证码为:" + code)
- choic = input("请输入验证码:\n")
-
- if choic.lower() == code.lower() or choic.upper() == code.upper():
- print("正确")
- else:
- print("错误")
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。