I am making a very simple password strength checker I have all the systems working I believe but when I run it the final process is not completed this seems to be because ver(verifier) is not updating, I'm almost positive I am going to be face palming once I get it to work I know it is very simple but for some reason I cant figure it out, thank you.
import time
ver1, ver2, ver3 = 0, 0, 0
y = 0
ver = 0
def check():
if len(p) >= 8 :
ver1 = 1
else:
print("password must be more that 8 characters and contain a combination of numbers and letters")
if p.islower():
print("please add some capital letters")
elif p.isupper():
print("please add some lower case letters")
else:
ver2 = 1
for i in p:
if i.isdigit():
ver3 = 1
break
else:
print("password must be more that 8 characters and contain a combination of numbers and letters")
while y == 0:
time.sleep(0.5)
print("\nwelcome to the number bank")
time.sleep(0.5)
p = input("please enter a password")
check()
ver = (ver1 + ver2 + ver3)
if ver == 3:
print("password accepted")
y = 1
else:
time.sleep(0.5)
print("\nwelcome to the number bank")
time.sleep(0.5)
p = input("please enter a password")
check()
print(ver1, ver2, ver3)