New to coding - I've made a colour game so the user can get as many points as possible under a set time. I am trying to insert the scores into a table.
global score
global timeleft
if timeleft > 0:
e.focus_set()
if e.get().lower() == colours[1].lower():
score += 1
e.delete(0, Tkinter.END)
random.shuffle(colours)
label.config(fg = str(colours[1]), text = str(colours[0]))
scoreLabel.config(text = "Score: " + str(score))
this is what i've tried so far for the data entry:
con=sqlite3.connect("winners.db")
cur= con.cursor()
def create_table():
cur.execute("CREATE TABLE IF NOT EXISTS winners(user TEXT,")
def data_entry():
cur.execute("INSERT INTO winners VALUES('User',")
con.commit()
cur.close()
con.close()
#create_table()
data_entry()
I'm trying to get two columns of Users and Scores.
Please let me know if something isn't clear.