|
发表于 2016-11-27 21:46:52
|
显示全部楼层
请教小甲鱼:
我的程序问题出在哪,为什么打印死机!
str1 = input('请输入需要检查的密码组合:')
count = 0
str2 ='~!@#$%^&*()-=_/,.?><;:[]{}|'
str3 = str1[0]
i = 0
x = 0
count1 = 0
while i<25:
count1 = str1.count(str2[i])
i=+1
x = x + count1
for y in str1:
count += 1
if count<=8 or str1.isalnum()==True :
print('''您的密码安全级别评定为:
请按以下方式提升您的密码安全级别:
1.密码必须由数字、字母及特殊字符三种组合
2.密码只能由字母开头
3.密码长度不能低于16位''')
elif count>8 and x==2 :
print('''您的密码安全级别评定为:中
请按以下方式提升您的密码安全级别:
1.密码必须由数字、字母及特殊字符三种组合
2.密码只能由字母开头
3.密码长度不能低于16位''')
elif count>=16 and x>=3 and str3.isalpha()==True :
print('''您的密码安全级别评定为:高
请继续保持''') |
|