+ 2

Password validation challenge problems

Hi How exactly do you fix this for the challenge? I had 2 out of 13 tests wrong... :/ import sys pw=input() pwl = list(pw) x=0 def valcheck(listname): rep=0 torf=False for x in listname: if x in pwl: rep += 1 if rep < 2: print("Weak") sys.exit() nums=["0","1","2","3","4","5","6","7","8","9"] spe=["@","!","#","%","&","*","

quot;] tf= False if len(pw) >= 7: listcheck=nums valcheck(listcheck) listname=spe valcheck(listname) print("Strong") else: print("Weak") sys.exit()

13th Mar 2020, 10:14 AM
Nagi Anezaki
Nagi Anezaki - avatar
3 Respuestas
+ 2
Input: Hello&World&42 Output: Weak Expected: Strong Hint: There are two special characters but they're repeated.
13th Mar 2020, 2:22 PM
Diego
Diego - avatar
0
ah
14th Mar 2020, 2:07 AM
Nagi Anezaki
Nagi Anezaki - avatar
0
thanks
14th Mar 2020, 2:07 AM
Nagi Anezaki
Nagi Anezaki - avatar