My all tests are not cleared(last 4) of PASSWORD VALIDATION...I m not getting it why??


1/30/2020 8:20:34 PM


5 Answers

New Answer


Now it works perfectly


Thanks a lot.....


m=input() k=list(m) d,s=0,0 for i in k: if i.isdigit(): d=d+1 elif i in ['$','#','!','%','&','*','@']: s=1+s if d>=2 and (len(k)-1)>=7 and s>=2: print("Strong") else: print("Weak")


Soumya Sahu Numbers and special charecters also counted as string length.. For ex: ABCDE23%% Here string length is 9 But you are calculating separately so Charecters 5 Digits 2 Special chars 2 c>=7 fails but string length is 9 should be display as strong..


Fine. You did it.. You are Wel come...