Complete the code to import the Flask class from the flask package.
from flask import [1]
You need to import the Flask class to create a Flask app.
Complete the code to create a Flask app instance named 'app'.
app = [1](__name__)The Flask app instance is created by calling the Flask class with __name__ as argument.
Fix the error in the route decorator to define a route for the home page.
@app.route([1]) def home(): return "Hello, Flask!"
The route decorator needs the URL path as a string. The home page is '/'.
Fill both blanks to run the Flask app only when this script is executed directly.
if __name__ == [1]: app.run([2])
The special variable __name__ equals "__main__" when the script runs directly. app.run(debug=True) starts the server with debug mode on.
Fill all three blanks to create a route '/about' that returns 'About page'.
@app.route([1]) def [2](): return [3]
The route decorator needs the path '/about'. The function name is about. The return value is the string 'About page'.