Flask MCQ Questions & Answers
Flask MCQs : This section focuses on "Flask" of Python Frameworks. These Multiple Choice Questions (MCQ) should be practiced to improve the Flask skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Flask is a web development framework created in ___________ language.
A. C
B. Java
C. Python
D. Javascript
View Answer
Ans : C
Explanation: Flask is a web development framework created in Python language.
2. Is the Flask framework open source?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: Yes, the Flask framework is open-source.
3. It is released under the ___________ Clause.
A. BSD-0
B. BSD-1
C. BSD-2
D. BSD-3
View Answer
Ans : D
Explanation: It is released under the BSD-3 Clause New or Revised License.
4. How to add the mailing feature in the Flask Application?
A. pip install Flask
B. pip install Flask-Mail
C. install Flask-Mail
D. pip Flask-Mail
View Answer
Ans : B
Explanation: To send emails, we need to install the Flask-Mail flask extension : pip install Flask-Mail
5. WSGI stands for the?
A. Write Server Gateway Interface
B. Web Static Gateway Interface
C. Web Server Gateway Interface
D. Web Server Gateway Interact
View Answer
Ans : C
Explanation: WSGI stands for the Web Server Gateway Interface.
6. Flask default port is?
A. 2000
B. 3000
C. 4000
D. 5000
View Answer
Ans : D
Explanation: Flask default port is 5000.
7. Flask default host is a localhost (127.0.0.1)
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, Flask default host is a localhost (127.0.0.1).
8. Flask is called a?
A. miniframework
B. microframework
C. peraframework
D. nanoframework
View Answer
Ans : B
Explanation: Flask is called a microframework because Flask only provides core features such as request, routing, and blueprints.
9. Which of the following are the benefits of using the Flask framework?
A. It has an inbuilt development server.
B. It has vast third-party extensions.
C. It is WSGI compliant.
D. All of the above
View Answer
Ans : D
Explanation: All of the above are the benefits of using the Flask framework.
10. Flask works with most of the RDBMSs, such as?
A. PostgreSQL
B. SQLite
C. MySQL
D. All of the above
View Answer
Ans : D
Explanation: Flask works with most of the RDBMSs, such as PostgreSQL, SQLite, and MySQL. However, to connect with databases, we must make use of the Flask-SQLAlchemy extension.
Discussion