title: How to create a leaderboard as a database
body: <p>I need to create a database which is a top 5 leaderboard, however, what I tried didn't work - it brought up many different errors (code below):</p>
  <pre><code>import sqlite3
  
  winner_name = input(&quot;Name: &quot;)
  winner_score = input(&quot;Score: &quot;)
  
  db = sqlite3.connect('C:\Users\user\Desktop\WORK\CS\NEA\Python')
  
  c = db.cursor()
  
  c.execute(&quot;&quot;&quot;CREATE TABLE Leaderboard
  (Place,text,
  Name, text,
  Score, text)
  &quot;&quot;&quot;)
  
  c.execute(&quot;&quot;&quot;INSERT INTO Leaderboard
               VALUES (&quot;1&quot;,winner_name,winner_score)&quot;&quot;&quot;)
  
  db.commit()
  c.execute('SELECT * FROM Leaderboard')
  row = c.fetchone()
  print(row)
  db.close()
  </code></pre>
  <p>Problems:</p>
  <ol>
  <li><p>The 4th line beginning &quot;db = &quot; comes up with an error on the brackets. I initially thought it had to do with the fact that I am trying to make a database and the program got confused, however, I am not sure.</p>
  </li>
  <li><p>On the line about halfway through beginning &quot;VALUES&quot;, I want to make winner_name and winner_score the variable from the start of the code, but I am not sure if I have done it right or wrong (it is highlighted green like speech not black).</p>
  </li>
  </ol>
  <p>Thank you for your help.</p>