<jupyter_start><jupyter_text>Logic, Control Flow and Filtering Password StrengthHere you will write a function that determines if a password is safe or not. The password will be considered strong enough if its length is greater than or equal to 10 symbols, it has at least one digit, as well as containing one uppercase letter and one lowercase letter in it. The password contains only ASCII latin letters or digits. Input: A password as a string. Output: Boolean value indicating if the password is safe or not.<jupyter_code>## Fill in this cell with your function
def password_strength(password):
    if len(password) >= 10:
        Upper = False; Lower = False; Digit = False
        # To run checks on each character in the password we have to use a for loop
        # We will learn more about these next week
        # you will want to perform the checks on the variable character
        for character in password:
            if Upper == True and Lower == True and Digit == True: return True
            if str.isupper(character): Upper = True
            elif str.islower(character): Lower = True
            elif str.isdigit(character): Digit = True
        if Upper == True and Lower == True and Digit == True: return True
        else: return False
    else: return False
    
## Run this cell to check your function
## If your function passes all tests there will be no output
## If there is a problem, python will raise an AssertionError
## Check the error message to see which example is throwing the error

assert password_strength("<PASSWORD>") == True, "Failed Check 1"
assert password_strength("password") == False, "Failed Check 2"
assert password_strength('<PASSWORD>') == False, "Failed Check 3"
assert password_strength('<PASSWORD>') == True, "Failed Check 4"
assert password_strength('<PASSWORD>') == False, "Failed Check 5"<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07032498668087374, 'fraction_numerical': 0.004794885455514118, 'mean_word_length': 3.671641791044776, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '414444', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 476, 'n_tokens_neox': 457, 'n_words': 251, 'path': 'solutions/6_Logic_ControlFlow_1_Solution.ipynb', 'repo_name': 'DCMB-GWC/challengeQuestions', 'size': '1885'}