Code works fine but still 4 test cases failed, how to resolve? https://www.sololearn.com/coach/76?ref=app | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Code works fine but still 4 test cases failed, how to resolve? https://www.sololearn.com/coach/76?ref=app

https://code.sololearn.com/cngwndrX0ra6/?ref=app

21st Mar 2020, 1:08 PM
Justus
Justus - avatar
6 Answers
+ 4
Try the code i shared above, am sure it must help
21st Mar 2020, 1:46 PM
Alfred Juma
Alfred Juma - avatar
+ 2
Try this Password validation pw = input() special = '!@#$%&*' nums = '0123456789' specount = 0 numcount = 0 if len(pw) > 6: lencheck = True else: lencheck = False for l in pw: if l in special : specount += 1 if l in nums : numcount += 1 if numcount > 1 and specount > 1 and lencheck: print("Strong") else: print("Weak") Happy coding 😊 Keep coding 🙏
21st Mar 2020, 1:25 PM
Alfred Juma
Alfred Juma - avatar
+ 1
Your code works fine, but, I want to know what's wrong with mine
21st Mar 2020, 1:47 PM
Justus
Justus - avatar
0
Tried it, same results
21st Mar 2020, 1:23 PM
Justus
Justus - avatar
0
Updated
21st Mar 2020, 1:35 PM
Justus
Justus - avatar
0
Same results: 4 test cases failed
21st Mar 2020, 1:43 PM
Justus
Justus - avatar