Loading...
QUIZ

Certification Test

 
Que No. 1 ) What is Flask's built-in mechanism for handling file uploads?

A.) upload-handler
B.) file-upload
C.) flask-uploads
D.) flask-wtf


Que No. 2 ) What is the role of the url_for function in Flask?

A.) To serve static files
B.) To define routes
C.) To generate URLs for a given view function
D.) To configure SSL certificates


Que No. 3 ) How can you create a custom error page in Flask?

A.) By using the app.errorhandler() decorator
B.) By defining a route for each error code
C.) By modifying the Flask source code
D.) Flask does not support custom error pages


Que No. 4 ) What is the purpose of the abort function in Flask?

A.) To terminate the Flask application
B.) To configure SSL certificates
C.) To send a specific HTTP error response and abort further processing
D.) To serve static files


Que No. 5 ) What is the role of the Blueprint object in Flask?

A.) To manage database connections
B.) To define URL patterns for parameterized routes
C.) To configure server settings
D.) To create modular, reusable applications


Que No. 6 ) What is the Flask-WTF extension used for?

A.) Handling file uploads
B.) Managing authentication
C.) Handling web forms and form validation
D.) Serving static files


Que No. 7 ) How can you use Flask to handle asynchronous tasks?

A.) By using the async keyword in route handlers
B.) By using the flask-asyncio extension
C.) Flask does not support asynchronous tasks
D.) By configuring the Flask server to run in multi-threaded mode


Que No. 8 ) What is the purpose of the @app.before_request decorator in Flask?

A.) To configure SSL certificates
B.) To define routes
C.) To execute a function before each request is processed
D.) To serve static files


Que No. 9 ) Which of the following is NOT a valid method for defining a route in Flask?

A.) @app.route('/path')
B.) @app.get('/path')
C.) @app.post('/path')
D.) @app.route('/path', methods=['GET'])


Que No. 10 ) What is the purpose of the @app.after_request decorator in Flask?

A.) To define routes
B.) To configure SSL certificates
C.) To execute a function after each request is processed
D.) To serve static files