Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
46 views

PSET 9: C$50 Finance. Why not <input type="number"> instead of text?

From CS50's Problem Set 9 specification: Require that a user input a number of shares, implemented as a text field whose name is shares. Render an apology if the input is not a positive integer. I'm ...
Facundo Lema's user avatar
0 votes
2 answers
693 views

PSET9 Finance: Check50 says Buy doesn't handle fractional/invalid shares, but when I try these things my page does reject them. Why check50 no like?

I have been using some of the html from the cs50 finance example page: https://finance.cs50.net/buy (which is permitted by CS50) I think it may be at the root of the problem. Here's the relevant html ...
cormacl's user avatar
  • 48
0 votes
1 answer
3k views

The view function did not return a valid response. The function either returned None or ended without a return statement

I can't figure out what is wrong in my code My python code: def buy(): """Buy shares of stock""" if request.method == "GET": render_template("buy....
Luana Nunes's user avatar