+ 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=app

25th Jul 2021, 12:01 PM
MasterTom18
MasterTom18 - avatar
3 Antworten
+ 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')
25th Jul 2021, 12:14 PM
A͢J
A͢J - avatar
+ 1
You are right it works! Thank you very much!!
25th Jul 2021, 12:19 PM
MasterTom18
MasterTom18 - avatar
0
MasterTom18 Your are welcome. Happy Coding.
25th Jul 2021, 12:30 PM
A͢J
A͢J - avatar