Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is what my output looks like with the program above. I need to assign titles to each piece of the above information when its

image text in transcribed

image text in transcribed

This is what my output looks like with the program above. I need to assign titles to each piece of the above information when its printed. So Url to the listed urls, visit count to the first integer, and last visit time to the second integers. How would I do this?

import sqlite3 try: conn = sqlite3.connect('History.db') Fexcept conn.DatabaseError: print("Cannot open database") exit(0) print("Successfully opened database") Edef sql_fetch(con): cursor_object = con.cursor() cursor_object.execute('SELECT url, visit_count, last_visit_time FROM urls') rows = cursor_object.fetchall() for row in rows: print(row[o], row[1], row[2]) sql_fetch(conn) testing x Successfully opened database http:/exus7.wonderhowto.com/how-to/easily-root-your-nexus-7-tablet-running-android-4-3-jelly-bean-windows-guide-0148100/ 0 0 https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8 1 13097079888223593 http://champlain.instructure.com/ 1 13089997953831257 https://champlain.instructure.com/ 2 13089997959260106 https://champlain.instructure.com/login 1 13089997953831257 https://champlain.instructure.com/login/saml 1 13089997953831257 https://my.champlain.edu/page_authrequired 1 13089997953831257 https://my.champlain.edu/auth/login 1 13089997955976503 https://champlain.instructure.com/saml_consume 1 13089997959260106

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

Students also viewed these Databases questions