Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
image text in transcribed
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 break O if m_lower or m_upper or m_digit or m symbols no modification is necessary ifm lower and m_upper and m_digit and m symbol: delete the break statement Question 4 3 pts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions