# GenCyber Login Program
# You've got to fill in the rest.
# Password "database".
password_db = {"Bill" : "Clawhammer",
"Jesse" : "Mitsu",
"Steven" : "Muddy",
"Ashley" : "Shadow"}
# Collect login information.
print("\n\n=========Login Page===========")
username = input("Username: ")
password = input("Password: ")
# GenCyber Login Program
# You've got to fill in the rest.
# Password "database".
password_db = {"Bill" : "Clawhammer",
"Jesse" : "Mitsu",
"Steven" : "Muddy",
"Ashley" : "Shadow"}
# Collect login information.
print("\n\n=========Login Page===========")
username = input("Username: ")
password = input("Password: ")
# Get correct password from database that matches username.
correct_password = password_db.get(username)
if correct_password == None:
# If correct_password is None that means user was not found.
print("User Not Found!")
elif correct_password != password:
# If passwords do not match then password is wrong.
print("Invalid Password")
else:
print("Congratulations, you are logged in.")
# GenCyber Login Program
# You've got to fill in the rest.
# Password "database".
password_db = {"Bill" : "Clawhammer",
"Jesse" : "Mitsu",
"Steven" : "Muddy",
"Ashley" : "Shadow"}
# Keep track of if we should keep looping.
loop_again = True
while loop_again:
# Collect login information.
print("\n\n=========Login Page===========")
username = input("Username: ")
password = input("Password: ")
# Get correct password from database that matches username.
correct_password = password_db.get(username)
if correct_password == None:
# If correct_password is None that means user was not found.
print("User Not Found!")
elif correct_password != password:
# If passwords do not match then password is wrong.
print("Invalid Password")
elif correct_password == password:
# If the password match stop looping and log in user.
loop_again = False
print("Congratulations, you are logged in.")