help fixing my password detetcor code in python
Hello, i dont know if thos was the appropriate place but im having trouble with my code saying the "break is outside the loop and all i can see is that my indentations are fine and it looks as though its in the if loop. what am i not seeing? #password strength detector import re, sys print("""check how strong your password is. it needs to be 8 characters long, contain both upper and lowercase characters and have at least one digit""") def passWordDetect(x): #8 characters long text = re.compile(r"[a-zA-Z0-9.\%]{8,}") text.search(x) if text.search(x) == None: print("Your password needs to be at least 8 characters long") else: break #one upper and lower text = re.compile(r"[A-Z]") text.search(x) if text.search(x) == None: print("Your password needs to contain at least one Upper and lower case characters") else: break # at least 1 digit text = re.compile(r"\d+") text.search(x) if text.search(x) == None: print("Your password needs to contain at least one number") else: print("Strong password") x = input("press ENTER to quit") if x == "": print("Quitting...") sys.exit() passWordDetect(x)