Write a Python program that prompts the user to enter a password and displays
Ask Expert

Be Prepared For The Toughest Questions

Practice Problems

Write a Python program that prompts the user to enter a password and displays

Project 4: Password Checker

•         Learning Objective: Using Python Methods and Functions 

Problem Description: 

Some Websites impose certain rules for passwords, involving use of certain numbers and special characters.

Write a Python program that prompts the user to enter a password and displays "valid password" if the rule is follows rules of the company, or "invalid password" otherwise.

Write a method or a function for implementing the password checking rules for the method/function as follows: 

•         A password must have at least eight characters.

•         A password must consist of only letters and digits.

•         A password must contain at least two digits.                 

Sample 1

Enter a string for password: wewew43x

valid password

Sample 2

Enter a string for password: 343a

invalid password

Hint
ComputerA method in python is somewhat similar to a function, except it is associated with object/classes. Methods in python are very similar to functions except for two major differences. The method is implicitly used for an object for which it is called. The method is accessible to data that is contained within the class....

Know the process

Students succeed in their courses by connecting and communicating with
an expert until they receive help on their questions

1
img

Submit Question

Post project within your desired price and deadline.

2
img

Tutor Is Assigned

A quality expert with the ability to solve your project will be assigned.

3
img

Receive Help

Check order history for updates. An email as a notification will be sent.

img
Unable to find what you’re looking for?

Consult our trusted tutors.

Developed by Versioning Solutions.