subject

import sqlite3 from contextlib import closing conn = sqlite3.connect("books. sqlite") conn. row_factory = sqlite3.Row with closing(conn. cursor()) as c: query = '''SELECT * FROM Book WHERE pages > ?''' c. execute(query, (100,)) books = c. fetchall() for book in books: print(book["name"], "|", book["author"], "|", book["pages"]) name = "The Case of the Killer Kangaroo" author = "Jane Doe" pages = 408 genreID = 1 with closing(conn. cursor()) as c: query = '''INSERT INTO Book (name, author, pages, genreID) VALUES (?, ?, ?, ?)''' c. execute(query, (name, author, pages, genreID)) connmit() print(name, "inserted.") author = "Katie Kanga" with closing(conn. cursor()) as c: query = '''UPDATE Book SET author = ? WHERE name = ?''' c. execute(query, (author, name)) connmit() print(name, "updated.")

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Which action is good business etiquette? a. switching your cell phone off before you enter a meeting b. keeping your cell phone on low volume before you enter a meeting c. setting a pleasant ring tone on your cell phone before you enter a meeting d. setting a standard ringtone on your cell phone before you enter a meeting
Answers: 1
question
Computers and Technology, 22.06.2019 12:30
Which of the choices sean are not true when considering virus behavior
Answers: 1
question
Computers and Technology, 22.06.2019 16:20
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
How do you make a lenny face? plz, brailiest to who can answer first.
Answers: 1
You know the right answer?
import sqlite3 from contextlib import closing conn = sqlite3.connect("books. sqlite") conn. row_fact...
Questions
Questions on the website: 13722362