Login Check
Completed
The correct username is admin and the password is s3cret. Read a username and a password. Print Welcome! if both match, Wrong password if only the username matches, otherwise Unknown user.
Input
Two lines.
Output
One message.
Example
Input
admin s3cret
Output
Welcome!
Editor
Python
Hints
An if statement can be nested inside another one.
Solution explanation
Nesting expresses "only check the password once the user is known".
Show solution
user = input()
pw = input()
if user == "admin":
if pw == "s3cret":
print("Welcome!")
else:
print("Wrong password")
else:
print("Unknown user")