My all tests are not cleared(last 4) of PASSWORD VALIDATION...I m not getting it why?? | SoloLearn: Learn to code for FREE!

+3

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

https://code.sololearn.com/cJ858XOiOUDn/?ref=app

1/30/2020 8:20:34 PM

SOUMYA SAHU

5 Answers

New Answer

+5

Now it works perfectly

+4

Thanks a lot.....

+4

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")

+2

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..

0

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