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. ``def check_length(password: str) -> bool:`` `` Check whether the password contains a least 8 characters.`` ``def check_letter(password: str) -> bool:`` ``Check whether the password contains a least 1 upper case letter and 1 lower case letter.`` ``def check_number(password: str) -> bool:`` ``Check whether the password contains a least 1 number.`` ``def check_password(password: str) -> bool:`` `` 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. ``Provide a password: PotatoTester123`` ``The provided password is valid.`` ``Provide a password: hello`` ``The provided password is invalid.``
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)