# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 2
#     language: python
#     name: python2
# ---

# # Logic & Control Flow Challenge Problem
#
# ## Password Strength
# Here 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.

## Fill in this cell with your function
def password_strength(password):

    
        # To run checks on each character in the password we have to use a for loop
        # We will learn more about loops next week
        for character in password:
            # perform checks on the variable password

# +
## 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"

StarcoderdataJupyterScriptsDedupFiltered