Advertisement
johnpentyrch

Ass3p6

May 17th, 2020
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. import sqlite3
  2. conn = sqlite3.connect("computer_cards.db")
  3. def create(name, cores, cpu_speed,ram,cost):
  4.     insert_sql = "INSERT INTO computer(name, cores, cpu_speed,ram,cost) VALUES ('{}', {}, {}, {}, {})".format(name, cores, cpu_speed,ram,cost)
  5.  
  6.     conn.execute(insert_sql)
  7. create("Commodore 64", 1, 0.985,64,595)
  8.  
  9.  
  10. conn.commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement