Homework 1
Write a program to input a username and password. Check if the username is "alpha" and password is "abc@123".
If not display an appropriate error message.
Answers
Answered by
0
Answer:
isusernamevalid=False
while isusernamevalid !=True:
print("Enter username")
username=input()
if username=="alpha": isusernamevalid=True
pass
ispasswordvalid=False
while ispasswordvalid !=True:
print("Enter password")
password=input()
if password=="abc@123": ispasswordvalid=True
pass
print("Username and password are correct")
Explanation:
this will work. i dont have python compiler to check
Similar questions
Sociology,
5 months ago
Math,
5 months ago
Business Studies,
11 months ago
Social Sciences,
1 year ago