-3

Right now with what I have, even if the password meets all the criteria it prints "Weak password try again!". It allows for another user input but it doesn't break and print "Strong password" if it is strong. Code:

if (l>= and u>=1 and p>=1 and d>=1 and l+u+p+d==len(s)):
    break
    print("Strong password")
else:
    print(input("Weak password, try again: "))
Skipz
  • 1
  • 2
  • 4
    Please post your code in the body of your question. See [how to ask a good question](https://stackoverflow.com/help/how-to-ask). – Ari Cooper-Davis Dec 03 '22 at 20:53
  • Welcome to SO, please keep in mind that we're not a code writting service, rather we help with specific questions. A few notes I can add here is: 1) these variable names are not descriptive, so we really don't know what you're doing. 2) You probably want to use a loop and a function, or at least a loop. 3) Providing details on the project you are doing will help us help you. 4) This sounds like it may be homework, which there is a separate site for. Best of luck! – Steve Byrne Dec 03 '22 at 21:09

1 Answers1

0
while True:
     passwordName = input("Password ? ")
     if (l>= and u>=1 and p>=1 and d>=1 and l+u+p+d==len(s)):
         print("Strong password")
         break

     else:
         print("Weak password, try again")
dde ttz
  • 37
  • 5