Flask Basics - 60 MCQs

Flask Basics - 60 MCQs

University

56 Qs

quiz-placeholder

Similar activities

REVIEW INFORMATIKA KELAS 7 SEMESTER 1

REVIEW INFORMATIKA KELAS 7 SEMESTER 1

7th Grade - University

60 Qs

Komputer Akuntansi (Accurate)

Komputer Akuntansi (Accurate)

University

60 Qs

NET1L - Lesson 1 (Network Components)

NET1L - Lesson 1 (Network Components)

University

58 Qs

#2 CIW Data Analyst - Certification Prep

#2 CIW Data Analyst - Certification Prep

9th Grade - University

54 Qs

Cloud Computing Quiz Final

Cloud Computing Quiz Final

University

60 Qs

Final Exam - DV

Final Exam - DV

University

60 Qs

R Prog Quiz - 2

R Prog Quiz - 2

University

60 Qs

Linux Test Prep 2

Linux Test Prep 2

8th Grade - Professional Development

55 Qs

Flask Basics - 60 MCQs

Flask Basics - 60 MCQs

Assessment

Quiz

Computers

University

Medium

Created by

Benjamin Hotor

Used 1+ times

FREE Resource

56 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command starts a Flask app in debug mode?

app.run()

app.run(debug=True)

flask debug

python debug app.py

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What decorator is used to define a route in Flask?

@url

@route

@app.route

@path

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does methods=['POST'] in a Flask route do?

Allows both GET and POST

Restricts the route to only POST requests

Restricts the route to only GET requests

Converts all requests to POST

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you visit /save in the browser when it only allows POST?

It shows a success message

It saves empty data

It raises a Method Not Allowed error

It redirects to /get

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which object is used to access form data sent in a POST request?

session

request.form

render_template_string

json.load

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does @app.route('/') define?

The error handler

The homepage (root route)

The session storage

The database connection

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does return render_template_string() do?

Loads a template file from /templates

Renders raw HTML given as a string

Returns plain text only

Reads an HTML file from disk

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?