Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in python please thanks! hw4 part2.py (Worth 14 points) Write a program that asks the user to enter a password, and then checks it for
in python please thanks!
hw4 part2.py (Worth 14 points) Write a program that asks the user to enter a password, and then checks it for a few different requirements before approving it as secure. (WARNING: This part of the homework is the most challenging, so budget plenty of time and brain power. And read the instructions carefully) The program follows these three rules for passwords 1. If the password is all lowercase, it must contain an exclamation mark. 2. The password cannot be less than eight characters long 3. The password cannot be longer than twenty characters long The program must re-prompt the user until they provide a password that satisfies all of the conditions above. It must also tell the user each of the conditions they failed, and how to fix it If there is more than one thing wrong (e.g., too long, and all lowercase with no exclamation mark), the program must print out both of the things that are wrong and how to fix them For this part of the homework, you must have an in-line comment at the top of each of your program's individual if, elif, and else statements, explaining what is being checked by that conditional. HINT Think carefully about what your conditionals should look like. If necessary, draw a truth table to help figure out what different inputs will do. Using a Boolean flag will also likely make this easier.) (PRO TIP: The livecoding file posted for creating a valid password from Lecture 8 may be a good place to start if you're stuck.)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