Looking for trustworthy answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Discover a wealth of knowledge from experts across different disciplines on our comprehensive Q&A platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

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

for Python


Sagot :

password = "Ada Lovelace"

if input("Enter the Password: ") == password:

   print("Correct!")

else:

   print("Not Correct")

I wrote my code in python 3.8. I hope this helps.