Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: First Table | Introduction to SQLite
Databases in Python
course content

Conteúdo do Curso

Databases in Python

Databases in Python

1. Introduction to SQLite
2. CRUD
3. More About SQLite
4. SQLAlchemy

bookChallenge: First Table

Tarefa
test

Swipe to show code editor

Your task is to complete the code that creates an SQLite database and a table called articles. Here’s what you need to do:

  1. Connect to the database my_database.db.
  2. Create a cursor to execute SQL commands.
  3. Use the cursor to create a table named articles with the following fields:
    • id — type INTEGER.
    • title — type TEXT.
    • content — type TEXT.
    • author — type TEXT.
  4. Save the changes and close the database connection.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 5
toggle bottom row

bookChallenge: First Table

Tarefa
test

Swipe to show code editor

Your task is to complete the code that creates an SQLite database and a table called articles. Here’s what you need to do:

  1. Connect to the database my_database.db.
  2. Create a cursor to execute SQL commands.
  3. Use the cursor to create a table named articles with the following fields:
    • id — type INTEGER.
    • title — type TEXT.
    • content — type TEXT.
    • author — type TEXT.
  4. Save the changes and close the database connection.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 5
toggle bottom row

bookChallenge: First Table

Tarefa
test

Swipe to show code editor

Your task is to complete the code that creates an SQLite database and a table called articles. Here’s what you need to do:

  1. Connect to the database my_database.db.
  2. Create a cursor to execute SQL commands.
  3. Use the cursor to create a table named articles with the following fields:
    • id — type INTEGER.
    • title — type TEXT.
    • content — type TEXT.
    • author — type TEXT.
  4. Save the changes and close the database connection.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Tarefa
test

Swipe to show code editor

Your task is to complete the code that creates an SQLite database and a table called articles. Here’s what you need to do:

  1. Connect to the database my_database.db.
  2. Create a cursor to execute SQL commands.
  3. Use the cursor to create a table named articles with the following fields:
    • id — type INTEGER.
    • title — type TEXT.
    • content — type TEXT.
    • author — type TEXT.
  4. Save the changes and close the database connection.

Once you've completed this task, click the button below the code to check your solution.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 1. Capítulo 5
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt