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
'''
def login(user_accounts, log_in, username, password): ''' This function allows users to log in with their userna
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am