Computer Science, asked by siddharth1230, 11 months ago

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 akshayamca14
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