Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAbdulmohsen Alkulaibi
323 Pointsnon 200 response at /multiply
although I added the route, i seem to be getting the following error : "non 200 response at /multiply"
from flask import Flask
app = Flask(__name__)
@app.route('/')
@app.route('/multiply/<int:n>/<int:m>')
def multiply():
return " {} * {} = {}".format(n,m,n*m)
1 Answer
John Lack-Wilson
8,181 PointsThere is no need to include the @app.route('/') route, as the challenge is only asking for the multiply route.
Also, the declaration for the multiply route should not include any parameters (i.e. @app.route('/multiply') should be the declaration)
Finally, the challenge is asking you to return the string of 5*5, so there is no need to use variables here, you can simply return str(5*5)