DAT/210 Week 5 Python LAB 6.22: Python and sqlite basics

$ 10

DAT/210 Week 5 Python LAB 6.22: Python and sqlite basics

Write a Python program that connects to a sqlite database.
Create a table called Horses with the following fields:
• id (integer): a primary key and not null
• name (text)
• breed (text)
• height (real)
• birthday (text)

Next, insert the following data row into the Horses table:
id: 1
name: ‘Babe’
breed: ‘Quarter Horse’
height: 15.3
birthday: ‘2015-02-10’

Output all records from the Horses table.
Ex: With the above row inserted, the output should be:
All Horses:
(1, ‘Babe’, ‘Quarter Horse’, 15.3, ‘2015-02-10’)

895 in stock

SKU: DAT210WK5LAB6P22 Category:

Description

DAT/210 Week 5 Python LAB 6.22: Python and sqlite basics

Write a Python program that connects to a sqlite database.
Create a table called Horses with the following fields:
• id (integer): a primary key and not null
• name (text)
• breed (text)
• height (real)
• birthday (text)

Next, insert the following data row into the Horses table:
id: 1
name: ‘Babe’
breed: ‘Quarter Horse’
height: 15.3
birthday: ‘2015-02-10’

Output all records from the Horses table.
Ex: With the above row inserted, the output should be:
All Horses:
(1, ‘Babe’, ‘Quarter Horse’, 15.3, ‘2015-02-10’)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.