Username and Password Verifier

name = input('Please enter your username:')
password = input('Please enter your password:')
if 6 <= len(name) <= 20:
    print('hint: username conforms to naming rules')
    if password[0].isalpha():
        print('hint: password conforms to naming rules')
    else:
        print('Error: password names must start with a letter')
else:
    if password[0].isalpha():
        print('Error: The password conforms to the naming rules, please rename the username, the username should be within 6-20 characters')
    else:
        print('Error: username should be within 6-20 characters and password must start with a letter')

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325852067&siteId=291194637