Python generating username and password program
I am just a beginner programmer and I am trying to create a username / password program. Here is my code below:
username = 'Polly1220'
password = 'Bob'
userInput = input("What is your username?\n")
if userInput == username:
a=input("Password?\n")
if a == password:
print("Welcome!")
else:
print("That is the wrong password.")
else:
print("That is the wrong username.")
Whenever I run my program and enter the correct password as shown, it always says the password is wrong.
+3
source to share