Question
in Python, Having a secure password is a very important practice, when much of our information is stored online. Write a program that validates a
in Python, Having a secure password is a very important practice, when much of our information is stored online. Write a program that validates a new password, following these rules:5 pts
The password must be at least 8 characters long
The password must have at least one uppercase and one lowercase letter
The password must have at least one digit
The program must also ask for a user to enter it and then confirm it:
Enter your password:
Re-enter your password:
If the passwords dont match or the rules are not fulfilled, the user is prompted again. Your program must include a function that checks whether the rules are passed and the password is valid (returns True if it is valid):
defisValidPassword(password)
Note: Re-enter password AFTER you validate the password first
Your code with comments
A screenshot of the execution
Test Cases:
Abcdefg (should get must have at least one digit)
1BCDEFG (should get must have at least one lower case)
1abcdefg (should get must have at least one upper case)
1Abcdef (should get must be at least 8 characters long)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started