Untitled

 avatar
unknown
plain_text
2 years ago
589 B
2
Indexable
# Login Interface code in Python

# defining the login function
def login():
    username = input("Enter your username: ")
    password = input("Enter your password: ")
    
    # here, you would typically run checks against a database or stored credentials to verify the username and password
    # for simplicity sake, we're just going to hardcode the credentials here
    if username == "user" and password == "password":
        print("Login successful!")
    else:
        print("Invalid username or password. Please try again.")
        login()

# running the login function
login()