Flask and Web Basics Quiz

Flask and Web Basics Quiz

University

9 Qs

quiz-placeholder

Similar activities

Flask-SQLAlchemy and Authentication Quiz

Flask-SQLAlchemy and Authentication Quiz

University

9 Qs

PRE TEST REFRESHMENT PROVISIONING BASIC

PRE TEST REFRESHMENT PROVISIONING BASIC

University - Professional Development

10 Qs

Level 2 Specialist Training

Level 2 Specialist Training

University

8 Qs

Tutorial

Tutorial

University

9 Qs

Robomaster Referee System Exam for RMUL 2024

Robomaster Referee System Exam for RMUL 2024

University

10 Qs

Quiz Harian Mata Kuliah Database Univ. Yudharta Pasuruan

Quiz Harian Mata Kuliah Database Univ. Yudharta Pasuruan

University

10 Qs

Topic Review

Topic Review

University

10 Qs

Mengenal PMM dan Rumah Belajar

Mengenal PMM dan Rumah Belajar

University

12 Qs

Flask and Web Basics Quiz

Flask and Web Basics Quiz

Assessment

Quiz

Instructional Technology

University

Medium

Created by

Kelvin Kipchumba

Used 1+ times

FREE Resource

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is Flask?

A lightweight web framework

A full-stack web framework

A database management system

A programming language

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the HTTP protocol do?

It sends requests and receives responses

It stores data on the server

It creates web pages

It manages user sessions

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a 404 status code indicate?

The resource doesn't exist

The request succeeded

The request is invalid

The server failed to process the request

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a blueprint in Flask?

  • A Blueprint is used to define the main structure of the application, including the layout and design.

A Blueprint in Flask is a way to organize routes and other components into smaller, reusable modules.

  1. Blueprints are used to generate the main database schema automatically.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What command initializes the migrations folder in Flask?

flask db init

flask db migrate

flask db upgrade

flask db downgrade

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the command 'flask db migrate' do?

flask db upgrade is used to apply the changes from the migration scripts to the database, updating its schema.

flask db upgrade is used to rollback database migrations to the previous version.

flask db upgrade is used to generate new migration scripts.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does 'flask db downgrade' do?

flask db downgrade is used to upgrade the database schema by applying the latest migration.

flask db downgrade is used to create new migration scripts based on changes to the models.

flask db downgrade is used to revert the database schema to a previous version by undoing applied migrations.

8.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the command to create a new migration script?

flask db migrate

flask db init

flask db upgrade

flask db revision

9.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

How would you retrieve a user from the User table by their ID using SQLAlchemy?

User.query.get(id)

User.query.filter_by(id=id).first()

User.query.all(id)

  1. User.filter(id=id)