Tuesday, July 22, 2025

WTP in python - Login System

 # Login System

# Ask for a username and password. 

# If both match predefined values, print "Login successful", else show appropriate error messages.

#username : abc

#password : 123



user=input("Please enter username: ")

password= input("Please enter the password:  ")


if(user=="abc" and password == "123"):

    print("Login successful")

elif(user != "abc" and password != "123"):

    print("both Incorrect Username and Password ")

elif (user != "abc"):

    print("Username is not correct ")

else:

    print("password is incorrect ")

No comments:

Post a Comment