From 11e518fc0d99101c776830fd0f0e3dd1fa91926e Mon Sep 17 00:00:00 2001 From: JakeAmaoh Date: Sat, 19 Sep 2026 01:43:03 +0100 Subject: [PATCH 1/4] 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/4] 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). From 27fdf4966b0b19a55e26e5e05e746a558c364a78 Mon Sep 17 00:00:00 2001 From: APPIAH JOSEPH <261028012+JakeAmoah@users.noreply.github.com> Date: Fri, 16 Oct 2026 11:26:04 +0000 Subject: [PATCH 3/4] Update password rules display for clarity --- PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py b/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py index 65d4d631..035186ff 100644 --- a/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py +++ b/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py @@ -9,7 +9,8 @@ def passwordValidator(): print('\nYour password should: ') print('\t- Have a minimum length of 6;') print('\t- Have a maximum length of 12;') - print('\t- Contain at least an uppercase letter or a lowercase letter') + print('\t- Contain an uppercase letter;') + print('\t-Contain a lowercase letter;') print('\t- Contain at least a number;') print('\t- Contain at least a special character (such as @,+,£,$,%,*^,etc);') print('\t- Not contain space(s).') @@ -42,4 +43,4 @@ def passwordValidator(): return 'Valid Password!' my_password = passwordValidator() -print(my_password) \ No newline at end of file +print(my_password) From e3f35155502ed0c4bc622737700496ce3529f619 Mon Sep 17 00:00:00 2001 From: APPIAH JOSEPH <261028012+JakeAmoah@users.noreply.github.com> Date: Fri, 16 Oct 2026 11:27:49 +0000 Subject: [PATCH 4/4] Fix password rules display for clarity --- PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py b/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py index 035186ff..924c7670 100644 --- a/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py +++ b/PASSWORD RELATED/password-validator/PASSWORD_VALIDATOR.py @@ -9,8 +9,8 @@ def passwordValidator(): print('\nYour password should: ') print('\t- Have a minimum length of 6;') print('\t- Have a maximum length of 12;') - print('\t- Contain an uppercase letter;') - print('\t-Contain a lowercase letter;') + print('\t- Contain at least an uppercase letter;') + print('\t-Contain at least a lowercase letter;') print('\t- Contain at least a number;') print('\t- Contain at least a special character (such as @,+,£,$,%,*^,etc);') print('\t- Not contain space(s).')