Complete the code to import the Flask class from the flask module.
from flask import [1]
The Flask class is imported from the flask module to create a web server.
Complete the code to create a Flask app instance named 'app'.
app = [1](__name__)Creating the Flask app instance requires calling Flask with __name__ as argument.
Fix the error in the route decorator to define the home page route.
@app.route('[1]') def home(): return 'Hello, Raspberry Pi!'
The home page route should be '/' to respond to the root URL.
Fill both blanks to run the Flask app on all network interfaces with debug mode on.
if __name__ == '__main__': app.run(host=[1], debug=[2])
Using host='0.0.0.0' makes the server accessible on the local network. Setting debug=True enables debug mode.
Fill all three blanks to create a route '/status' that returns JSON with a message and status code 200.
@app.route([1]) def status(): return [2], [3]
The route '/status' returns a dictionary message and HTTP status code 200.