马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 一个账号 于 2020-3-5 18:42 编辑 password = input("请输入需要检查的密码组合:")
str1 = '~' in password
str2 = '!' in password
str3 = '@' in password
str4 = '#' in password
str5 = ' in password
str6 = '%' in password
str7 = '^' in password
str8 = '&' in password
str9 = '*' in password
str10 = '(' in password
str11 = ')' in password
str12 = '_' in password
str13 = '=' in password
str14 = '-' in password
str15 = '/' in password
str16 = ',' in password
str17 = '.' in password
str18 = '?' in password
str19 = '<' in password
str20 = '>' in password
str21 = ';' in password
str22 = ':' in password
str23 = '[' in password
str24 = ']' in password
str25 = '{' in password
str26 = '}' in password
str27 = '|' in password
str28 = '\\' in password
str99 = str1+str2+str3+str4+str5+str6+str7+str8+str9+str10+str12+str13+str14\
+str15+str16+str17+str18+str19+str20+str21+str22+str23+str24+str25+str26+str27+str28
print(str99)
if len(password) <= 8 and str99 == 0:
print("您的密码安全级别评定为:低")
elif len(password) > 8 and str99 == 2:
print("您的密码安全级别评定为:中")
elif len(password) > 16 and str99 == 3:
print("您的密码安全级别评定为:高")
缩进错了吧,if ,elif缩进应该相同
另外,下次发代码记得点输入框上面的<>来插入
|