Challenge: First Table
Task
Swipe to start coding
Your task is to complete the code that creates an SQLite database and a table called articles
. Hereβs what you need to do:
- Connect to the database
my_database.db
. - Create a cursor to execute SQL commands.
- Use the cursor to create a table named
articles
with the following fields:id
β typeINTEGER
.title
β typeTEXT
.content
β typeTEXT
.author
β typeTEXT
.
- Save the changes and close the database connection.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 4.76Awesome!
Completion rate improved to 4.76
Challenge: First Table
Task
Swipe to start coding
Your task is to complete the code that creates an SQLite database and a table called articles
. Hereβs what you need to do:
- Connect to the database
my_database.db
. - Create a cursor to execute SQL commands.
- Use the cursor to create a table named
articles
with the following fields:id
β typeINTEGER
.title
β typeTEXT
.content
β typeTEXT
.author
β typeTEXT
.
- Save the changes and close the database connection.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5
single
Awesome!
Completion rate improved to 4.76
Challenge: First Table
Swipe to show menu
Task
Swipe to start coding
Your task is to complete the code that creates an SQLite database and a table called articles
. Hereβs what you need to do:
- Connect to the database
my_database.db
. - Create a cursor to execute SQL commands.
- Use the cursor to create a table named
articles
with the following fields:id
β typeINTEGER
.title
β typeTEXT
.content
β typeTEXT
.author
β typeTEXT
.
- Save the changes and close the database connection.
Solution
Everything was clear?
Thanks for your feedback!