Ask Question
23 April, 10:44

Test if a password entered is correct. The secret phrase is Ada Lovelace. Sample Run 1 Enter the Password: Ada Lovelace Sample Output 1 Correct! Sample Run 2 Enter the Password: Blaise Pascal Sample Output 2 Not Correct

+1
Answers (1)
  1. 23 April, 14:43
    -1
    a1="Ada Lovelace"

    a2 = input ("Enter Password: ")

    def checkpassword (a2):

    if a2 = = a1:

    print ("Correct Password")

    else:

    print ("Wrong Password")

    return 0

    Explanation:

    The string as password is given. Now we ask the user to input the password, and this is compared to the original password. If the passwords match, print password matched, or else print wrong password.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Test if a password entered is correct. The secret phrase is Ada Lovelace. Sample Run 1 Enter the Password: Ada Lovelace Sample Output 1 ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers