Question: Based in Python 3.5.1 The company you are working for was very happy with your username validator, and now they want you to write a

Based in Python 3.5.1

The company you are working for was very happy with your username validator, and now they want you to write a password validator for their website. Here are the rules for passwords:

Passwords must be at least 8 characters long (but they do not have an upper limit)

Passwords cannot contain the user's username (i.e. if the username is "My1stUsername" the password cannot be "abcMy1stUsername" or "My1stUsernameABC" because the username can be found inside of the password String)

Passwords must be a mixture of uppercase letters (A-Z), lowercase letters (a-z), digits (0-9) and a select number of special characters (#, $, % and &). The password must contain at least one of each of these types of characters in order to be valid.

You can make a copy of Part 1a and place your password validator code directly after your username validator. Here's a sample running of the program. Note that you need to continually ask the user for a password until they supply a good one.

Please enter a username: MyAwesome1Name Your username is valid! Please enter a password: abc Passwords must be at least 8 characters long Please enter a password: MyAwesome1Name2 You cannot use your username as part of your password Please enter a password: 2MyAwesome1Name You cannot use your username as part of your password Please enter a password: abcabcabc Your password must contain at least one digit Please enter a password: abcabcabc1 Your password must contain at least one uppercase character Please enter a password: ABCabcabc1 Your password must contain at least one 'special' character Please enter a password: ABC***abc1 Your password contains at least one invalid character Please enter a password: ABC#$%abc1 Your password is valid! 

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!