Question 21
Consider the following two code snippets.
Snippet 1
@app.route("/base")@app.route("/home")def homepage(): return "Welcome to MAD I!"Snippet 2
@app.route("/mad1")def homepage(): return "Welcome to MAD I!"
@app.route("/mad2")def homepage(): return "Welcome to MAD II!"Which of the following is/are correct options if the above snippets are run as view functions of a flask application ?
Snippet 1 is valid, but Snippet 2 is invalid.
Snippet 2 is valid, but Snippet 1 is invalid.
Snippet 1 will run successfully, while Snippet 2 will raise an AssertionError.
Snippet 2 will run successfully, while Snippet 1 will raise an AssertionError.