Answered step by step
Verified Expert Solution
Question
1 Approved Answer
language: python Problem 1 Loops. This code verifies a user's password and prints it if it satisfies all requirements, otherwise it keeps asking the user
language: python
Problem 1 Loops. This code verifies a user's password and prints it if it satisfies all requirements, otherwise it keeps asking the user for a password. Please read the code and answer the following five questions about it. import ce p_lower = re.compile('[-]') p_upper - re.compile('[A-2]') P. digit - re.compile('[0-9]") P_symbol .re.compiler(?! 1) while True password - Input ("A password should have at least one lowercase letter, in one uppercase letter, one digit, and a special character: 5621 In Please enter your password: lower - p_lower.search(password) upper - pupper.search(password) m_digit - p digit.search(password) Symbol - p_symbol.search(password) if not_lower ! print ("You need to use a lowercase letter.") continue if not upper : print ("You need to use an uppercase letter." continue $f not m dicit: print ("You need to use a digit.") continue if not m_symbol print ("You need to use a special character.) continue break print("Your password is set to (password).") Hotel The question order is shuffled by default in quizzes on Canvas. If you want to do the questions 1 order, then answers questions labeled as 01 then 02 then 0 then 04 then 05. Question 1 3 pts Question 3 3 pts Problem 1 Q5. How the break statement should be modified to fix the program? What header with a Boolean expression should be placed before the break statement? if 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