+ 1
Help, a test is giving me error
This is the statement: Write a program that takes in a string as input and evaluates it as a valid password. The password is valid if it has at a minimum 2 numbers, 2 of the following special characters ('!', '@', '#', '
#x27;, '%', '&', '*'), and a length of at least 7 characters. If the password passes the check, output 'Strong', else output 'Weak'. This is my code: https://code.sololearn.com/c79Knbl3MKY2/?ref=app3 ответов
+ 2
MasterTom18
There should be i >= 2 and j >= 2
if i >= 2 and j >= 2 and len(p) >= 7:
print('Strong')
else:
print('Weak')
+ 1
You are right it works! Thank you very much!!
0
MasterTom18
Your are welcome. Happy Coding.