97.0k views
0 votes
g Create a program that prompts a user to enter a login name and password. The correct login name is Admin, and the correct password is PASS. If both login name and password are correct, display Correct Loginto the console window. If the login name or password is wrong, display what is wrong to the console window. For example, wrong username, wrong password, or both. program in C

User Kent Hu
by
5.0k points

1 Answer

4 votes

Answer:

Answered below.

Step-by-step explanation:

//Program in Python

login_name = "Admin"

password = "PASS"

display = " "

user_login_name = input ("Enter username: ")

user_password = input("Enter your Password: ")

if user_login_name == login_name and user_password == password:

display = "Correct Login"

elif user_login_name != login_name:

display = "wrong username"

elif user_password != password:

display = "wrong password"

print(display)

User Nick Spacek
by
5.4k points