Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Password Validator During this semester you learned the Python topics of variables, conversions, arithmetic statements, logical constructs, looping constructs, functions, lists and string methods. This

Password Validator
During this semester you learned the Python topics of variables, conversions, arithmetic statements, logical constructs, looping constructs, functions, lists and string methods. This final project is the culmination of all those topics for you to demonstrate all that you have leamed during the past 15 weeks.
Note: You can NOT USE Python's Regular Expression Oparations known better as regex. You can only use what you learned in this class:
-variables
-conversions
-arithmetic statements
-logical constructs
-looping constructs
-functions
-lists
-string methods
Use Python String functions to build a program to do the following to perform Password Validation. Make sure you use the examples Professor Candido has provided and use the Python String Functions document found in Week 15. These are the required 12 coding steps:
Prompt the user for their First and Last name and store the input into a variable called sName.
Prompt the user for their desired password and store their response in a variable called sPassword.
Extract out the first initial from the first name and the first initial of the last name from the variable sName and put in a new variable called sInitials. For example if Brian Candido is in the sName variable then the sInitials should contain BC. You can assume the user will enter 1 first name and 1 last name.
Check to make sure the sPassword length is between 8 and 12 characters. If the password is not within the required length write out the message: Password must be between 8 and 12 characters.
Check to make sure the sPassword starts does not start with Pass or pass. If not write out the Password can't start with Pass.
Check to make sure the sPassword contains at least I uppercase letter A through Z. If not write out the message: Password must contain at least I uppercase letter.
Check to make sure the sPassword contains at least I lowercase letter a through z. If not write out the message: Password must contain at least I lowercase letter.
Check to make sure the sPassword contains at least I number between 0 and 9. If not write out the message: Password must contain at least I number.
Check to make sure the sPassword contains at least 1 of these special characters: ! @ # $%^. If not write out the message; Password must contain at least I of these special characters: ! @$%???
Check to make sure the sPassword does not contain the value of sInitials within the string. For example sPassword cannot contain BC or bc or any variation of BC so you will need to convert to either lowercase or uppercase than compare using Python string functions. If not write out the message: Password must not contain user initials.
No character can be present more than once. Write code to process each character in the password and keep track of how many occurrences are present. If any character (either uppercase or lowercase versions) is in the password more than 1 output the character and how many occurrences and print out the message: These characters appear more than once:
If sPassword passes all the above checks output this message: Password is valid and OK to use.
Make sure your code has a main() function. It is your optional choice if you want additional functions.
Password Validator
Daring this semester you learnod the Pytion topies of variables, conversions, anilhnetic statemenls, begical Wou lemedin this chasent
watiably cemptions
arithmetic statemenis
Lagical coreteruas
Happirg cancthucit
finctions
(istis
1:ring melhads
Use Pythas String functions to build a program to do the following to perform Fassword Validuion. Make sure you use the cxample Prafessar Candido has provided and use the Python String Functions docuncan found in Week 15. These are the required 12 coding steps.
Prompt the user for their First and last name and store the input into a varible called slame:
2 Prompit the user for their desired paswond and store their response in a variable elled sPassword
Extract oxt the first initial from the firse name and the first initial of the last name from the vinable s Name and put in a new varisble called sInitials. For cxample if R Ron Couthte is in the sName variable then the sInithals shoeld eonuin BC. You can assume the user will enter I frist name and I last name.
Check to make arre the sPassword length is between 8 and 12 characters. If the parsword is not within
Check to make aure the sPassword starts does not start with Pass or pass. If not write out the Prenwoud can ' siart with Pass.
Cheek ta muke arre the sPassword contains at lenst 1 upperense letter A through 7. If not write our the
Check to make sure the sPassword contains at least I lowercase letter a through z. If not write out the messape: Password must contalu or least I lowercase lener.
Check to make
image text in transcribed

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

Describe the importance of global talent management.

Answered: 1 week ago

Question

Summarize the environment of recruitment.

Answered: 1 week ago