Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task: Assume you are creating a new account for some service and you need to provide a password. The password should satisfy the following requirements

Task: Assume you are creating a new account for some service and you need to provide a password. The password should satisfy the following requirements to be accepted:

The password should be at least 6 characters long and at most 20 characters.

It must have at least one lowercase letter, one uppercase letter and one number.

Write a Python program (password_rules.py) using the methods in the table above, that prompts the user to issue a password and checks if the password is valid. If the password is valid, it will print a confirmation statement. Otherwise, it should print a statement (see Sample Output).

image text in transcribed

image text in transcribed

Method Description Returns true if the string contains only alphabetic letters or digits and is at least one character in length. Returns false otherwise. Returns true if the string contains only alphabetic letters and is at least one character in length. Returns false otherwise. Returns true if the string contains only numeric digits and is at least one character in length. Returns false otherwise. Returns true if all of the alphabetic letters in the string are lowercase, and the string contains at least one alphabetic letter. Returns false otherwise. Returns true if the string contains only whitespace characters and is at least one character in length. Returns false otherwise. (Whitespace characters are spaces, newlines (In), and tabs (It) Returns true if all of the alphabetic letters in the string are uppercase, and the string contains at least one alphabetic letter. Returns false otherwise. isalnum) isalpha() isdigit() islower() isspace () isupper ()

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

5. Arranging for the training facility and room.

Answered: 1 week ago

Question

1. Discuss the five types of learner outcomes.

Answered: 1 week ago