Skip to main content
2 votes
Accepted

Lab 9: Birthdays - odd behaviour from delete button

Have you validated the HTML? (see Week 8 Lecture, starting at minute 54). The problem is identified in the spoiler, but you might want to take your generated HTML through the Direct Input tab at ...
DinoCoderSaurus's user avatar
2 votes
Accepted

Check50 marks my "Quote" as if not functioning properly despite looking identical to the staffs solution

If the price is "even dollars" (ie no cents) like 28.00, quoted.html will display as $28.0. Consider using usd to transform price, either in the buy function or quoted.html.
DinoCoderSaurus's user avatar
1 vote

CS50 PSET 9 Finance "sell handles valid sale: expected to find "56.00" in page, but it wasn't found"

I had an error in sell.html where I was returning values in the format "'symbol': 'stocksymbol'" instead of just the actual symbol, which I then tried to correct in my python code to only ...
scrypter's user avatar
1 vote
Accepted

PS9 Finance does not appear in Gradebook as done

Apparently style50 was causing the issue. In my particular case I had two styling problems: (1) I used double quotes inside a formated string flash(f"Welcome back, {session['username']}") ...
superpav's user avatar
1 vote

Could someone take a look at my finance index? I'm going round in circles and can't find the problem. Everything appears as it should when I test

Thanks to @DinoCoderSaurus - the issue was needing to have my extra helper functions in the main app.py, for some reason importing them from helpers wasn't enough for check50. All passed after that!
temiboy's user avatar
  • 11
1 vote
Accepted

CS50 pset9: Why does 'SELECT last_insert_rowid()' return 0 instead of the expected value when using CS50 SQL library in Flask?

You're not doing anything wrong; it is a function of CS50's sql wrapper. There is a solution. From the spec hints: If str is an INSERT, and the table into which data was inserted contains an ...
DinoCoderSaurus's user avatar
1 vote
Accepted

my cs50 finance buy do not update in in the portfolio

Assuming the transactions table is the portfolio and assuming the program indenting is as shown: if cash < total_price: return apology("not enough cash") db.execute("UPDATE ...
DinoCoderSaurus's user avatar
1 vote
Accepted

ValueError: UNIQUE constraint failed: on finance pset9, could someone point me in the right direction on which values should be UNIQUE from my table?

The error is on compras.id, which implies it is defined as UNIQUE. (Perhaps edit the compras schema into the question). The INSERT into compras is setting id to user_id, which would allow one purchase ...
DinoCoderSaurus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible