IT 117: Intermediate Scripting
Class 16 Ungraded Quiz

  1. What is the name of the module that allows Python to work with a SQLite database?

  2. What would you enter at the command line if you wanted a SQLite command line that let you work with the database contained in the file work.db?

  3. If you were writing a Python script that needed to work with a SQLite database what is the first thing you would have to create?

  4. Write the Python statement that would create the thing mentioned above on the SQLite file work.db.

  5. Once you have the thing mentioned above, what is the next thing you have to create?

  6. Write a Python statement that creates this thing.

  7. What must you do to make sure the changes you have made to a table are saved?

  8. Write the Python statement to perform the action mentioned above.

  9. Write the Python statement to run the query
    select * from students
    using the cursor cur.

  10. Write the Python statements to print the results of the previous query.