Using functions, ask the user for a password that is 8 characters long, must have 2 digits and contain at least one upper and one lower case letter. Create FOUR functions 1) Asking for the password - does not need to be a function. 2) Is the password long enough? If so, return CORRECT and move to the next function. If not, ask them to enter a new password 3) Does the password has 2 numbers in it? If so, return CORRECT and move to the next function. If not, ask them to enter a new password 4) Does the password has at least
Using functions, ask the user for a password that is 8 characters long, must have 2 digits and contain at least one upper and one lower case letter.
Create FOUR functions
1) Asking for the password - does not need to be a function.
2) Is the password long enough? If so, return CORRECT and move to the next function. If not, ask them to enter a new password
3) Does the password has 2 numbers in it? If so, return CORRECT and move to the next function. If not, ask them to enter a new password
4) Does the password has at least one LOWER case letter? If so, return CORRECT and move to the next function. If not, ask them to enter a new password
5) Does the password has at least one UPPER case letter? If so, return CORRECT and move to the next function. If not, ask them to enter a new password
Have each time they have entered something CORRECT provide a CORRECT statement and a small time delay.
Step by step
Solved in 5 steps with 2 images