making a login function for python code example
Example: python code for login page
CorrectUsername = surname[0:3] + firstname[0:3]
loop = 'true'
while (loop == 'true'):
username = input("Please enter your username: ")
if (username == CorrectUsername):
password = input("Please enter your password: ")
if (password == CorrectPassword):
print("Logged in successfully as ") + username
loop = 'false'
else:
print "Password incorrect!"
else:
print "Username incorrect!"