title: Python Retrieving Information from an SQLite3 Database
body: <pre><code>import sqlite3
  
  Class = str(input("Which class are you in? A) 11A B) 11B C) 11C"))
  f_name = str(input("What is your first name?"))
  s_name = str(input("What is your surname?"))
  h_score = "8"
  a_score = "7"
  t_taken = "3"
  
  if Class == "11A" or "11a":
      counter = 0
      while counter &lt; 1:
          db_students = sqlite3.connect('//persian/controlledassessment$/work/11 C CS/10BakeEd/Python/Task 2/db_Students.db')
          c=db_students.cursor()
          c.execute('''CREATE TABLE IF NOT EXISTS ClassA
           (student_firstname text,
          student_surname text,
          h_score number,
          a_score number,
          t_taken number,
          Class text)
          ''')
          c.execute('''INSERT INTO ClassA
           VALUES (?, ?, ?, ?, ?, ?)''',(f_name, s_name, h_score, a_score, t_taken, Class))
          db_students.commit()
          c.execute("SELECT * FROM ClassA")
          fetchall=c.fetchall() 
          print(fetchall)
          db_students.close()
          counter = counter + 1
  
  
  
  
  
  elif Class == "11B" or "11b":
      print()
  
  elif Class == "11C" or "11c":
      print()
  
  else:    
      print("")
  </code></pre>
  
  <p>This is my code at the moment and some of the variables at the are placeholders. What I want to do is pull information out of the database that I have created and assign it to a variables so that I can use them in calculations such as averages.</p>