From 11e518fc0d99101c776830fd0f0e3dd1fa91926e Mon Sep 17 00:00:00 2001 From: JakeAmaoh Date: Sat, 19 Sep 2026 01:43:03 +0100 Subject: [PATCH 1/2] Program now checks for uppercase letter inclusion --- PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py b/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py index 76dfbef5..65d4d631 100644 --- a/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py +++ b/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py @@ -24,9 +24,13 @@ def passwordValidator(): if ' ' in userPassword: message = 'Invalid Password..your password shouldn\'t contain space(s)' return message - if not any(i in string.ascii_letters for i in userPassword): + if not any(i in string.ascii_uppercase for i in userPassword): message = 'Invalid Password..your password should contain at least ' - message += 'an uppercase letter and a lowercase letter' + message += 'an uppercase letter' + return message + if not any(i in string.ascii_lowercase for i in userPassword): + message = 'Invalid Password..your password should contain at least ' + message += 'a lowercase letter' return message if not any(i in string.digits for i in userPassword): message = 'Invalid Password..your password should contain at least a number' From efe1508690e360c5a2ffb0fafcdd7f8d76c01831 Mon Sep 17 00:00:00 2001 From: JakeAmaoh <261028012+JakeAmoah@users.noreply.github.com> Date: Sat, 19 Sep 2026 01:59:59 +0100 Subject: [PATCH 2/2] logical error in README.md fixed --- PASSWORD RELATED/password-validator/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PASSWORD RELATED/password-validator/README.md b/PASSWORD RELATED/password-validator/README.md index 8ce2d6f7..feb673c5 100644 --- a/PASSWORD RELATED/password-validator/README.md +++ b/PASSWORD RELATED/password-validator/README.md @@ -3,7 +3,8 @@ This program validates passwords to match specific rules. A valid password is one that conforms to the following rules: - Minimum length is 6; - Maximum length is 12; -- Contains at least an uppercase letter or a lowercase letter +- Contains at least an uppercase letter +- contains at least a lowercase letter - Contains at least a number; - Contains at least a special character (such as @,+,£,$,%,*^,etc); - Doesn't contain space(s).