+ 1
Please explain any one that why this code not qualifying last test case
4 odpowiedzi
+ 2
You have "2," (Extra camma)... , instead of "2"
+ 8
JuZip ,
this task is from code coach, a part of the task description is:
>> 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'.
so the the special characters/ symbols are sufficient, no need to import punctuation from module strjng.
+ 2
Hi Manjunath Badiger
I think it's because of the amount of punctuation you test for. There are more than you include in your list.
See python string module:
https://docs.python.org/3/library/string.html
There is the string.punctuation that contains:
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~.
You could use this as variable to test.
don't forget to import string
+ 1
Thank all of u for ur helpful replies..🧡