Question: 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


![it. import re p_lower re.compile(r'[a-z]') p_upper = re.compile('[A-Z]') p_digit = re.compile('[0-9]') p_symbol](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f509b30f0f6_83466f509b2a2080.jpg)
![= re.compile(r'[@#$%&?! ]') while True : password input("A password should have at](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f509b3a90a0_83566f509b3459ea.jpg)

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 rea the code and answer the following five questions about it. import re p_lower re.compile(r'[a-z]') p_upper = re.compile('[A-Z]') p_digit = re.compile('[0-9]') p_symbol = re.compile(r'[@#$%&?! ]') while True : password input("A password should have at least one lowercase let ter, In one uppercase letter, one digit, and a special character: @#$%&?! \ Please enter your password: ") m_lower - p_lower.search(password) m_upper = p_upper.search(password) m_digit - p_digit.search(password) m_symbol - p_symbol.search(password) if not m_lower : print ("You need to use a lowercase letter.") continue if not m_upper : print ("You need to use an uppercase letter.") continue if not m_digit : 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).") Note: The question order is shuffled by default in quizzes on Canvas. I f you want to do the questions in order, then answers questions labeled as Q1 then 02 then 03 then 04 then Q5. 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
Get step-by-step solutions from verified subject matter experts
