+ 1
Password validation problem..
Can you please point out my mistakes? string= input() firstTest= string.isalnum() ex= string.count("!") ha= string.count("#") st= string.count("*") ad= string.count("&") dl= string.count("
quot;) pr= string.count("!") at= string.count("@") secondTest= ex+ha+st+ad+dl+pr+at lenght= len(string ) if firstTest == False : if secondTest >1 : if lenght >=7: print ("Strong") else : print ("Weak") else : print ("Weak") else : print ("Weak") Remains two test casesđ2 Answers
+ 2
you must test if the password has at least 2 numbers. what you did will work even if the password has no number. the isalnum method returns true if each character of the string is either a letter or a number
+ 1
Thanks. I'll look into it