# data[].attributes.body
valid_users = {

"user1": "password123",

"admin": "adminpass",

"guest": "guest123",

}

def get_user_input():

username = input("Enter your username: ")

password = input("Enter your password: ")

return username, password

# data[].attributes.body
valid_users = {

"user1": "password123",

"admin": "adminPass",

"guest": "guest123",

}

def get_user_input():

username = input("Enter your username: ")

password = input("Enter your password: ")

return username, password

# data[].attributes.body
Valid_users={

"user1":"password123",

"admin":"adminPass",

"guest":"guest123",

}

def get_user_input():

username=input("Enter your username:")

password=input("Enter your password:")

return username, password

# data[].attributes.body
valid_user={

"user1":"password123",

"admin":"adminpass",

"guest":"guest123",

}

def get_user_input():

username=input("Enter your username:")

password=input("Enter your password:")

return username,password

# data[].attributes.body
def login_system():

username, passoword = get_user_input()

if authenticate(username, password):

print("acses granted, welcome!")

else:

print("acses denied. invalid username or password.")

# data[].attributes.body
def authenticate(username,password):

if username in valid_users:

if valid_users[username]==password:

return True

else:

return False

else:

return False

# data[].attributes.body
def authenticate(username, password):

if username in valid_users:

if valid_users[username] == password:

return True

else:

return False

else:

return False

# data[].attributes.body
def login_system():

username, password = get_user_input()

if authenticate(username, password):

print("Access granted. Welcome!")

else:

print("Access denied. Invalid username or password.")

# data[].attributes.body
def authenticate(username, password):

if username in valid_users:

if valid_users[username] == password:

return True

else:

return False

else:

return False

# data[].attributes.body
def login_system():

username, password = get_user_input()

if authenticate(username, password):

print("Access granted. Welcome!")

else:

print("Access denied. Invalid username or password.")

# data[].attributes.body
def authenticate (username, password):

if username in valid_users:

if valid_user [username] == password:

return True

else:

return False

else:

return False

# data[].attributes.body
# Step 4: Output wether the user is granted access

def logic_system():

username, password = get_user_input() # Step 2: Get user input

if authenticate(username, password): # Step 3: Compare credentials

print("Access granted, Welcome!")

else:

print("Access denied. Invalid username or password.")