def login(user_accounts, log_in, username, password): ''' This function allows users to log in with their userna
Posted: Thu May 26, 2022 9:19 am
def login(user_accounts, log_in, username, password):
'''
This function allows users to log in with their
username and password.
The user_accounts dictionary stores the username and
associated password.
The log_in dictionary stores the username and
associated log-in status.
If the username does not exist in user_accounts or
the password is incorrect:
- Returns False.
Otherwise:
- Updates the user's log-in status in the log_in
dictionary, setting the value to True.
- Returns True.
For example:
- Calling login(user_accounts, "Brandon", "123abcAB")
will return False
- Calling login(user_accounts, "Brandon",
"brandon123ABC") will return True
'''
'''
This function allows users to log in with their
username and password.
The user_accounts dictionary stores the username and
associated password.
The log_in dictionary stores the username and
associated log-in status.
If the username does not exist in user_accounts or
the password is incorrect:
- Returns False.
Otherwise:
- Updates the user's log-in status in the log_in
dictionary, setting the value to True.
- Returns True.
For example:
- Calling login(user_accounts, "Brandon", "123abcAB")
will return False
- Calling login(user_accounts, "Brandon",
"brandon123ABC") will return True
'''