All Questions
4 questions
0
votes
0
answers
234
views
Pset8 Finance - Sell - Fails to update user's cash in "users" table, and fails to insert sold shares into "portfolio" table
Big picture: On the sell page of the CS50 Finance, I select the shares symbol I want to sell, and enter the number of shares, and click the Sell button, which redirects me to the homepage, but the ...
-1
votes
2
answers
88
views
finance how to compare requested shares to shares owned
I'm having trouble trying to figure out how to write the sql statement to receive the amount of shares owned so I can compare it to the number requested, and if owned - requested < 0, don't let ...
0
votes
1
answer
510
views
pset 8 finance: :( sell handles valid sale
:)
Struggle with the last check. Get this error message:
expected to find "56.00" in page, but it wasn't found
Tried the same approach like I used for the buy-function. Create an extra template to ...
0
votes
1
answer
106
views
pset8 finance: Problem with calculaton for "/sell"
I'm implementing the "sell" function and have a problem with the calculation of the new value for "share" and "cash".
Here is my code:
@app.route("/sell", methods=["GET", "POST"])
@login_required
...