WHY THIS PASSWORD VALIDATOR IS NOT WORKING PROPERLY?? 🥺(look at comment please)(SOLVED) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

WHY THIS PASSWORD VALIDATOR IS NOT WORKING PROPERLY?? 🥺(look at comment please)(SOLVED)

I it is password Validater based on python. I tried my best but it is not working properly

29th Jul 2020, 6:45 AM
Satadeep Dasgupta
Satadeep Dasgupta - avatar
3 Answers
+ 3
This looks perfectly fine to me. Just check your internet connection and retry submitting it. It should definately work if still not working then tell me the error generated by the compiler.
29th Jul 2020, 7:04 AM
Arsenic
Arsenic - avatar
+ 1
#input password #atleast 7 char,2 num,2 symbol pass_wrd = input() pass_wrd = pass_wrd.replace(' ','') leng=0 resm=0 ress=0 symbols = ['!', '@', '#', '
#x27;, '%', '&', '*'] numbers= ['1','2','3','4','5','6','7','8','9','0'] def co_sym(x): sym=0 for i in range(7): if x==symbols[i]: sym=sym+1 else: continue return sym def co_num(y): num=0 for j in range(10): if y==numbers[j]: num=num+1 else: continue return num if len(pass_wrd)>=7: leng=1 for x in pass_wrd: symt=co_sym(x) if symt==None: continue else: ress=ress+symt for y in pass_wrd: numt=co_num(y) if numt==None: continue else: resm=resm+numt if resm>=2 and ress>=2 and leng==1: print("Strong") else: print("Weak")
29th Jul 2020, 6:46 AM
Satadeep Dasgupta
Satadeep Dasgupta - avatar
+ 1
Arsenic Thanku buddy. It's working🥰🥰🥰
29th Jul 2020, 7:26 AM
Satadeep Dasgupta
Satadeep Dasgupta - avatar