
Abdulmohsen Alkulaibi
323 Pointscorrect route for multiplier
i get the following error when running the code: "Bummer: Didn't get a 200 at /multiply"
The route includes empty URL and the multiply URL, so why am I getting the error?
thanks
from flask import Flask
app = Flask(__name__)
@app.route('/')
@app.route('/multiply/<int:n>/<int:m>')
def multiply():
return " {} * {} = {}".format(5,5,5*5)
1 Answer

John Lack-Wilson
8,164 PointsThis is because the challenge expects you to use the exact route "/multiply" and no others. If you remove the @app.route('/') and also the '/<int:n>/<int:m>' then you're off to a good start.
Secondly, the challenge is asking you to specifically calculate 5 * 5. Hint there is no need to use variables here.