Question: Using python: Write a program that reads a single string and determines whether or not is valid as a password based on the following rules:

Using python:

Write a program that reads a single string and determines whether or not is valid as a password based on the following rules:

Password must contain at least one digit (1, 2, 3, 4, 5, 6, 7, 8, 9, 0)

Password must contain at least one lowercase letter (a, b, c, etc.)

Password must contain at least one uppercase letter (A, B, C, etc.)

Password must contain at least one of the following: ! @ # $ % & _ =

Password must not contain the same character more than once (e.g. not allowed: password, pa$$word, pa55word, paSSword, secret. We will allow "Elefant" as the two e's are in different letter case.) Your program shall display:

"The password is valid" only if it satisfies all the requirements listed above

If the password is not valid, the program shall say so, and print a message describing the first rule not met by the password. NOTE: Do not use Regular Expressions in this program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!