Oct-03-2017, 03:06 PM
My goal: when a user enters a username it calls their password from a text document of multiple peoples passwords for password verification.
Info: Passwords when written are put on separate lines for ease of access. usernames are written to a separate text document.
My problem: So i'm new to python but have a decent understanding of the basics. all i want is for the user to be able to pull their password for verification as i intend to have multiple users able to access scores and difficulty of quizes they have taken, quiz score and info are also stored on a text document, now i know how to read certain lines of a text document BUT getting the program to define usernames to certain passwords is beyond me i currently have this setup to ask them if they do actually own an account ,the firstname(), is for if they dont as a username is a combination of the three first letters of their name and their age :
def usernameask():
global user
print("Do you allready have a username and password?")
user = input(str("Please answer in lower case: "))
askcheck()
def askcheck():
if user == str("yes"):
passverification()
else:
print("You must create a user account")
firstname()
if anyone could help me get their password but not tell them from here it would be greatly appreciated, thanks.
Info: Passwords when written are put on separate lines for ease of access. usernames are written to a separate text document.
My problem: So i'm new to python but have a decent understanding of the basics. all i want is for the user to be able to pull their password for verification as i intend to have multiple users able to access scores and difficulty of quizes they have taken, quiz score and info are also stored on a text document, now i know how to read certain lines of a text document BUT getting the program to define usernames to certain passwords is beyond me i currently have this setup to ask them if they do actually own an account ,the firstname(), is for if they dont as a username is a combination of the three first letters of their name and their age :
def usernameask():
global user
print("Do you allready have a username and password?")
user = input(str("Please answer in lower case: "))
askcheck()
def askcheck():
if user == str("yes"):
passverification()
else:
print("You must create a user account")
firstname()
if anyone could help me get their password but not tell them from here it would be greatly appreciated, thanks.