Complete the code to check if a password is strong enough by verifying its length.
def is_strong_password(password): return len(password) [1] 8
The password is strong if its length is greater than or equal to 8 characters.
Complete the code to check if user input matches the expected secret key.
def check_secret_key(input_key, secret_key): return input_key [1] secret_key
We want to confirm the input matches the secret key exactly, so we use '=='.
Fix the error in the code that checks if a user role is 'admin' to allow access.
def has_access(user_role): if user_role [1] 'admin': return True return False
Use '==' to compare values. '=' is assignment and causes an error here.
Fill both blanks to create a dictionary of users with their access levels, including only those with level above 3.
users_access = {user: level for user, level in user_levels.items() if level [1] 3 and user [2] 'guest'}We want users with level greater than 3 and user not equal to 'guest'.
Fill all three blanks to filter a dictionary of users with uppercase names, their scores, and only those with scores above 50.
filtered_scores = {user[1]: score for user, score in scores.items() if score [2] 50 and user [3] 'admin'}User names are converted to uppercase with '.upper()'. Scores must be greater than 50, and user 'admin' is excluded.