0
Why is test case #8 wrong (code coach password validator) ?
password = input() def validation(x): marks = ["!", "@", "#", "
quot;, "%", "&", "*"] l = len(x) if l >= 7: count = 0 count_1 = 0 for i in range(l): if x[i].isdigit(): count += 1 if count >= 2: for v in range(l): if x[v] in marks: count_1 += 1 else: print("Weak") if count_1 >= 2: print("Strong") else: print("Weak") validation(password)1 Respuesta
+ 2
What if input has length>=7 and digits>=2 but no special characters or less than 2. ?
Its no outputting!