Create login interface by id and password in Python

Source Code (Method -1)

id=input(“Enter your Id: “)

pas=int(input(“Enter your password : “))

if id==”brcinstitute”:

    if pas==123:

        print(“Login Success”)

    else:

        print(“Password is wrong”)

else:

    print(“Id is wrong”)

Output

 Enter your Id: brcinstitute
Enter your password : 78
Password is wrong

Source Code (Method -2)

id=input(“Enter your Id: “)

pas=int(input(“Enter your password : “))

if id==”brcinstitute” and pas==123:

    print(“Login Success”)

else:

    print(“Eithr id or password is wrong”)

Output

 Enter your Id: brcinstitute
Enter your password : 123
Login Success

Leave a Comment

Your email address will not be published. Required fields are marked *