Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
user=input("Enter password")
while not (6 <= len(user) <= 12):
    user=input("The password needs to be at least 6 characters and no more than 12, enter password again")
if user in (choice2) or user in str(choice) or user in  (choice1):
    print("password is weak")
elif user in  choice2 and  choice1 or user in choice and choice1 or user in choice and choice2:
    print("your password is medium")
elif user in choice2 and  choice1 and  choice:
    print("your password is strong")

when i run this it doesnt tell the user if their password is strong, medium or weak:
Enter passwordlllllll
Richard MacCutchan 12-Dec-15 14:37pm    
You need to compare individual letters of the password. Your if statements are looking for the string "111111" in your choice fields; do you see it anywhere?
kesh123 12-Dec-15 17:36pm    
how do i do that?
Richard MacCutchan 13-Dec-15 3:02am    
Count the number of characters that are repeated. See for all the String methods and operations.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900