#Password security evaluation(密码安全性评估)
Alpha = 'abcdefghijklmnopqistuvwxyzQWERTYUIOPASDFGHJKLZXCVBNM'
Digit = '0123456789'
Symbols = ',./\_*+-@#%!'
password = input('请输入你的密码:')
lenths = len(password)
while (password.isspace() or lenths == 0):
password =input('输入的密码不能为空或者含有空格,请重新输入:')
lenths = len(password)
#判断密码长度
if lenths <= 8:
flag_len = 1
elif 8 < lenths <16:
flag_len = 2
else:
flag_len = 3
flag_con = 0
#判断密码的组合
#判断是否含有字母
for each in Alpha:
if each in password:
flag_con += 1
break
#判断是否含有数字
for each in Digit:
if each in password:
flag_con += 1
break
#判断是否含有特殊字符