0

Could anyone tell what is the wrong with this code

This code is for the password validator challenge there is one problem that i don't know https://code.sololearn.com/cqjOp13m6SFd/?ref=app

6th Jan 2021, 8:23 PM
Loay Ahmed
Loay Ahmed - avatar
4 odpowiedzi
+ 5
it working fing
6th Jan 2021, 10:45 PM
VṢtēphen
VṢtēphen - avatar
+ 2
Share what error you getting @Loay Ahmed Elgendy? Just tried to run your code, it seems to work fine. Gives valid output if password is "strong" or "weak"
6th Jan 2021, 11:45 PM
Shivani 📚✍
Shivani 📚✍ - avatar
+ 1
import re pswd = input() special = re.sub ("[!@#$%&*]", "", pswd) nums = re.sub ("[\d]", "", pswd) if len(pswd) < 7 or len(special) == len(pswd) or len(nums) == len(pswd): print ("Weak") else : print ("Strong") This is the answer i found it on Google
9th Jan 2021, 10:38 AM
Loay Ahmed
Loay Ahmed - avatar
0
It's a challenge and There is one problem and the error is in hidden test The challenge need minimum 2 numbers, 2 of the following special characters and a length of at least 7 characters
7th Jan 2021, 7:54 AM
Loay Ahmed
Loay Ahmed - avatar