def get_username() -> str:
    """Asks the user for a username and returns it"""

    while True:
        username: str = input("Enter a username: ")

        if username == "":
            print("The username cannot be blank")
            continue

        if len(username) > 16:
            print("The username must be 16 characters or less")
            continue

        if not username.strip("_").isalnum():
            print(
                "The username must be made up of only alpha numeric characters and underscores"
            )
            continue

        break

    return username