Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

At a certain university, passwords for the universitys network must be at least 7 characters long. Write a program ( main() ) to display the

At a certain university, passwords for the universitys network must be at least 7 characters long.

Write a program ( main() ) to display the criteria for the password, and ask the user for their password.

Pass the password to a function ( validate_password ) that will evaluate whether the password is valid or not and return True or False. Then main() will output a message to the user telling them whether their password has been accepted, or if they must try again.

Remember the len() function!

Once you have this working add more tests to the validation function to ensure that the password also has:

  • At least one lower-case character
  • At least one upper-case character
  • At least one numerical character

Finally, create a list of special characters (like @, !, # etc) and require at least one of those as well J

Python has functions like .isupper(), .islower(), .isdigit() which will be useful. Dont forget the in keyword either J

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

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

13-1 How does building new systems produce organizational change?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago