15,997,667 members
See more:
```he password should contain at least:
one upper case letter, and one lower case letter.
8 characters.
1 number.

Code

The password should comply with the 3 constraints mentioned earlier. Implement an individual function to check for each constraint. Since the password has to comply with all three of the constraints, you will need to implement one additional function to tie everything together.

Design your program as described below. Complete the docstrings with doctests and any other explanation you deem necessary.

`` Check whether the password contains a least 8 characters.``

``Check whether the password contains a least 1 upper case letter and 1 lower case letter.``

``Check whether the password contains a least 1 number.``

`` Check whether the password passed all three of the tests.``

``if __name__ == '__main__':``

``<Main program, which can only call a single function>``

Tips

There is no single correct solution for each of the checks! There’s more than one way to implement each of the functions, so take a look at all of the string operations in the book for inspiration.
Beware! When you check whether a password contains both an upper case letter and a lower case letter, you also need to check whether there is any letter at all.

Examples

Ultimately, your program has to produce output like the examples below.

What I have tried:

I have tried to do the assignment and keep getting different errors. i would like a step by step how i can do this assignment
Posted
Updated 18-Sep-22 7:25am

## Solution 1

The answer is the same as I posted at Write a program to determine whether two rectangles are of identical dimensions?[^]. And your time would be better spent by focusing on one assignment at a time.

## Solution 2

You're not going to get a step-by-step on how to do this. Doing so would be doing your homework for you and that's not helping you.

What you need to do is provide the code for each function that's going to do a single specific check of the string that's passed to it and returning true or false depending on the result of the check, like checking the string to see if it meets a minimum length requirement.