|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
letter='qwertyuiopasdfghjklzxcvbnmQWERTYUIOPLKJHGFDSAZXCVBNM'
symbol='!@#$%^&*()_+|}{:>?<*.,;\][=-'
first=0
second=0
third=0
temp=input('请输入密码:')
has_num=False
for apple in temp:
if apple in num:
has_num=True
if has_num:
first+=1
has_letter=False
for apple in temp:
if apple in letter:
if has_letter:
first+=1
has_symbol=False
for apple in temp:
if apple in symbol:
if has_symbol:
first+=1
length=len(temp)
if length<=8:
second=1
elif 16>=length>8:
second=2
elif length>=16:
second=3
if temp.istitle():
third=1
while 1:
if first==1 and second==1:
print('低')
elif first==2 and second==2:
print('中')
elif first==3 and second==3 and third==1:
print('高')
break
为什么报错啊,而且输完密码后不继续进行了 |
|