So if you look at line 4 and 12 you see when i register everything the user puts in should show up in the txt file but i doesn't and if you look at line 38 it give's me an error it tells me that everything i have put in between the parentheses is not recognized.
from __future__ import with_statement
from asyncore import write
def reg(Ussername, Password, Age, Real_name, Last_name, Email):
global file
file = open ("User_details.txt","a")
file.write("\n"+Ussername+","+Password+","+Age+","+Real_name+","+Last_name+","+Email)
file.close
def login():
pass
def Access():
if option1 == "login":
input ("Ussername: ")
input ("Password: ")
input ("Age: ")
input ("Real name: ")
input ("Last name: ")
input ("Email: ")
login()
else:
print ("Enter all the info we will be asking you to register")
input ("Ussername: ")
input ("Password: ")
input ("Age: ")
input ("Real name: ")
input ("Last name: ")
input ("Email: ")
def begin():
global option1
print ("Hi my name is Steve would you like to register or login")
option1 = input ("Login or Register: ")
if option1 not in ("login", "register"):
begin()
begin()
Access()
reg(Ussername, Password, Age, Real_name, Last_name, Email)