CS50 Finance | CS 50 Week 9 Problem Set Finance UPDATE | Beginners Guide to PSET 9 2024

Поділитися
Вставка
  • Опубліковано 10 січ 2025

КОМЕНТАРІ • 94

  • @rochmanreese01
    @rochmanreese01 Рік тому +4

    Hi Devin. Thanks so much for this video. I learned so much from following along with you. I was able to clean up my code and get rid of a lot of unnecessary things. I like how your code is quite clean and tidy. I was then able to add in other things like change password, add and deposit funds and even a transaction log for deposits and withdrawals. best of all, after all that it still passed cs50s check. Thanks again.

    • @RealisticResponse
      @RealisticResponse  Рік тому +4

      Great job going above and beyond. Strongly recommend. I'm happy you were at a place where you could add some good functions. Congrats! Let me know what you do for your final project!

  • @joseconde8722
    @joseconde8722 Рік тому +4

    Used all of your videos for help. Thank for everything!

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      Best type of comments! Well done! Keep up the good work!

  • @fishnotfosh
    @fishnotfosh Рік тому +8

    omg i love you i spend like 3 days getting nowhere and i finished in 2 hours after this vid

    • @RealisticResponse
      @RealisticResponse  Рік тому +4

      The struggle is REAL! congrats! You're so close to done. Good job!

  • @cuItcore
    @cuItcore Рік тому +2

    4:43, what is the line u used for the sell shares function?what i have is
    stocks = db.execute("SELECT symbol, SUM(shares) as total_shares FROM transactions WHERE user_id: user_id GROUP"
    user_id=session["user_id"])

    • @cuItcore
      @cuItcore Рік тому

      @app.route("/sell", methods=["GET", "POST"])
      @login_required
      def sell():
      """Sell shares of stock"""
      stocks = db.execute("SELECT symbol, SUM(shares) as total_shares FROM transactions WHERE user_id: user_id GROUP"
      user_id=session["user_id"])
      if request.method == "POST":
      symbol = request.form.get("symbol").upper()
      shares = request.form.get("shares")
      if not symbol:
      return apology("must provide symbol")
      elif not shares or not shares.isdigit() or int(shares)

    • @cuItcore
      @cuItcore Рік тому

      thank you so much for this video!!! i have followed and completed the project (not yet submitted and still errors in check50) although there are bits and pieces where code is missing because of offscreen for mostly index function throughout sell if you could paste?

    • @RealisticResponse
      @RealisticResponse  Рік тому

      you're missing a part earlier video:
      ua-cam.com/video/l7wELOgKqLM/v-deo.html
      Week 9 problem set finance.

    • @RealisticResponse
      @RealisticResponse  Рік тому

      ​@@cuItcore Youre watching the update not the original:
      ua-cam.com/video/l7wELOgKqLM/v-deo.html
      Please watch the original video to answer these questions.

  • @michelledelacruz9958
    @michelledelacruz9958 10 місяців тому +3

    Thank you so much for all your videos. I’ve tried submitting this pest and still no success 😢 can you make a video for the 2024 version PLEASE?!?!

    • @pf6993
      @pf6993 9 місяців тому

      hi friend. can you find answer for 2024 version ?

    • @RealisticResponse
      @RealisticResponse  8 місяців тому

      Hey both. I'll be working on that but so far this code still passes last I checked - but bear with me I'm just getting back into this. It will be done though.

  • @gouthamkrishna6922
    @gouthamkrishna6922 7 місяців тому +4

    Hi Devin! Why do I keep getting these :
    :( registering user succeeds and portfolio page is displayed
    application raised an exception (see the log for more details)
    :( registration rejects duplicate username
    application raised an exception (see the log for more details)

    • @vyomchaturvedi9545
      @vyomchaturvedi9545 6 місяців тому +2

      I have the same issue

    • @arthurnilo6894
      @arthurnilo6894 Місяць тому

      @@vyomchaturvedi9545 me too, thats the only thing that i need to do to finish the course... do you guys did it?

    • @wilhelmrembergroma9508
      @wilhelmrembergroma9508 Місяць тому

      how did you solve this issue ??

    • @arthurnilo6894
      @arthurnilo6894 Місяць тому

      @@wilhelmrembergroma9508 you need to check your sql!

  • @azipage
    @azipage 4 місяці тому +2

    but what about those using 2024 version, I followed your long video about finance , but the code didn't work for me. I don;t know the reason :( please, get back to me if you can, appreciate it!

    • @Shan-u5k
      @Shan-u5k 3 місяці тому +1

      me too , any update ?

  • @juanmurta2587
    @juanmurta2587 14 днів тому

    Discord link is not working anymore. Someone fix the error: TypeError: can't multiply sequence by non-int of type 'float' ?

  • @kuhuuuu
    @kuhuuuu Місяць тому

    hello! i've been stuck on this problem for 4 days now and it does not seem to be going anywhere. i've done as you've told in the code but still it is not passing check50. All the erros i'm getting are of FLASK. can anyone help.?

  • @irvingello
    @irvingello Рік тому +3

    Hey Devin, i keep facing the issues :( registration rejects duplicate username and :( registering user succeeds with the log saying
    "sending POST request to /register
    exception raised in application: RuntimeError: unused values (user_id)."
    Any idea how to solve this? Thanks!

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      Not quite sure where the error is except that it's in the def register function.
      Without seeing it I couldn't guess what specifically it is but it's very likely in that portion of the code.

    • @irvingello
      @irvingello Рік тому +1

      @@RealisticResponse Hi devin, thanks for the help. Do u mind helping tonsee my code if anything is missing or wrong as i can't find it. Can send me an updated discord link maybe? cos the one in the description is outdated

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      @@irvingello just letting you know I saw this I'll get you the updated code this evening and assist

    • @irvingello
      @irvingello Рік тому

      @@RealisticResponseooo alright thanks alot man!!!!

    • @RealisticResponse
      @RealisticResponse  Рік тому

      @@irvingello discord.gg/avW9TTDU

  • @kedarbikkannavar5907
    @kedarbikkannavar5907 3 місяці тому +1

    hey , can you please share the codes for all all of these? It would be really helpful since I'm encountering a lot of errors even after debugging it all.

    • @RealisticResponse
      @RealisticResponse  3 місяці тому +1

      Unfortunately, I do not post complete codes. I do this to avoid the happenstance of copying. My videos are designed as walk-thrus and teaching assistance. As such I do not post complete codes. I will, however, try to help you with any issues you encounter. There are lots of comments already answered on this video to various questions. Perhaps your errors are already in there and answered somewhere? Let me know how else I can help.

  • @Ramiobomb
    @Ramiobomb Місяць тому

    Hey Devin, I've been trying the code style, even tried copying it 1 to 1 just incase I have messed up, but I always end up with these error during registration, it says I need to provide password and during check50 it shows me these:
    :( buy handles valid purchase
    Cause
    expected to find "112.00" in page, but it wasn't found
    :( sell page has all required elements
    Cause
    application raised an exception (see the log for more details)
    Log
    sending POST request to /login
    sending GET request to /sell
    exception raised in application: TemplateSyntaxError: expected token 'end of statement block', got '%'
    :( history page shows transactions
    Cause
    application raised an exception (see the log for more details)
    Log
    sending POST request to /login
    sending GET request to /history
    exception raised in application: UndefinedError: 'transacion' is undefined
    Any recommendations please?

  • @omnia-amo
    @omnia-amo Рік тому +2

    Hey, I’m really confused. I did everything in both videos and copied the code, but the screen after logging/registering in isn’t popping up. It just redirects to the original log in/registering screen. I can’t get logged in and when I try, I get the apology message.

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      Sounds like your loops (spacing/tabs) might be off. I dont know the error message you're getting but your loops may be in the wrong places. if .py doesnt have anything underlined in red, then it's likely a spacing issue. Without the error or the logs its difficult to tell but I'd say spacing is a good place to start.

    • @omnia-amo
      @omnia-amo Рік тому +1

      @@RealisticResponse there is no error message, rather when I click on register and try to make an account, the page reloads after hitting the register button. I think it’s either the register function or the log in function (more likely register)

    • @omnia-amo
      @omnia-amo Рік тому

      @@RealisticResponseok now I found something weird, I checked your other video for finance and I accidentally wrote “methods” instead of “method” in my register.html file and when I fixed that error and try to log in, then I get the apology “passwords do not match.”
      The code for comparing the passwords is this, right?
      elif not request.form.get(“password”) != request.form.get(“confirmation”)
      return apology (“blah blah blah”)
      I’m pretty sure it’s just the register function

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      @@omnia-amo This is impossible for me to tell. I can't see where the error is but your log (the live data log while the flask application is running) might have more information. Check your terminal while your on the flask run app and se what happens when you try to register - there should be some information there. There's a live log on flask as its running.

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      @@omnia-amo why do you have "not" after elif?
      it should be
      elif request.form.get("password") != request.form.get("confirmation"):
      return apology("passwords do not match")

  • @kostasrossis
    @kostasrossis 8 місяців тому +1

    I still get an error and idk why. in the buy section it tells me "TypeError: can't multiply sequence by non-int of type 'float'" and IDK why it drives me crazy. ive done everything the same as you

    • @RealisticResponse
      @RealisticResponse  8 місяців тому

      discord.gg/TTY3UFRV
      be patient with me - notifications don't always come through but I'm trying to help as many as I can.

  • @teejee8017
    @teejee8017 5 місяців тому +1

    Yo devin! I've been following your code here, but I keep encountering an error:
    :( quote handles invalid ticker symbol
    expected status code 400, but got 404
    and
    :( quote handles valid ticker symbol
    application raised an exception (see the log for more details)
    :( buy page has all required elements
    expected button to submit form, but none was found
    Where am i going wrong???

    • @RealisticResponse
      @RealisticResponse  5 місяців тому

      hey hey! Sorry for the delay. Were you able to solve this or do you still need help?

  • @zubijaved10
    @zubijaved10 Рік тому +1

    Devin update version of finance he can't get the information form the api.key . He get information form yahoo finance how to solve this api key problem

    • @RealisticResponse
      @RealisticResponse  Рік тому

      you shouldn't need the api key anymore since the update. and check50 never needed it so you should be good. this api issue has been removed - i guess many students were having issues.

  • @muhammadsaadrehman485
    @muhammadsaadrehman485 Рік тому +1

    Hi! How are your?
    I'm really grateful for your videos and they helped me lot but can you help me with this same pset. my code ismost probably correct cause its the same as yours but why do I keep getting "Can't check until a frown turns upside down" do you know anything related to this? My deadline is tomorrow I'd really appreciate it if you replied early!

    • @Namechange539
      @Namechange539 Рік тому +1

      hey brother getting same problem did you find any solution???

    • @muhammadsaadrehman485
      @muhammadsaadrehman485 Рік тому

      @@Namechange539definaely not stuck on that damn problem for weeks

    • @RealisticResponse
      @RealisticResponse  Рік тому

      Don't worry about the deadline. You still have time. What is the error that it's finding? - if it's "expected to find 112.00 and it didn't find it. You have to pay attention in the video I mention it 3 times and there's hints in the description. I also answer it in many comments here you should find the help you need.

  • @zubijaved10
    @zubijaved10 Рік тому +2

    I done it . Bro thank to you ☺️

  • @HondaS2000kid
    @HondaS2000kid Рік тому +1

    How come I can’t find tideman. Did you skip that problem?

    • @RealisticResponse
      @RealisticResponse  Рік тому

      Looks like it! I did runoff but I'll go back. Try to have one up this weekend.

  • @Bbynic
    @Bbynic 9 місяців тому +1

    Hi Devin, I really need your help with finance week 9. How can I reach you ?

  • @OlavoCosta_
    @OlavoCosta_ Рік тому +4

    Hello brother, I am having an error in my code in which is:
    :( buy handles valid purchase expected to find "9,888.00" in page, but it wasn't found
    I hope you can help me.

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      Please read the many comments on this. I mention it twice in the video and in the description and have answered many comments. The answer you seek is here just give it a look through

    • @anelisgh
      @anelisgh Рік тому +2

      have you solved it? because i get the same error

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      @@anelisgh feel free to hop into discord for some 1 on 1 or help from some of our other learners.

    • @katayounfadaei
      @katayounfadaei Рік тому

      Hi , please share your discord account

    • @davidninoaguirrecampis6617
      @davidninoaguirrecampis6617 Рік тому

      @OlavoCosta_ Where so able to solve the problem? I have the same issue and I haven't figure it out. I've been asking for help and no one has replied

  • @zubijaved10
    @zubijaved10 Рік тому +1

    Please make new video of finance .like other peset

    • @RealisticResponse
      @RealisticResponse  Рік тому

      Old video is same code in this video - no change is needed - that video and the code therein works and passes check50 without issue.

  • @angelgabrielraus2952
    @angelgabrielraus2952 6 місяців тому

    Could you update the video, please? I have been issues with my code on july 2024

    • @kathbuerano7545
      @kathbuerano7545 6 місяців тому +1

      I'm working on PSET 9 also and my code is not working. :( what issues do you encounter?

    • @angelgabrielraus2952
      @angelgabrielraus2952 6 місяців тому

      @@kathbuerano7545 mainly when I set stock, but in general it has to do with when I type "FROM transactions"

    • @angelgabrielraus2952
      @angelgabrielraus2952 6 місяців тому

      @@kathbuerano7545 on transaction. I don't know what to do

    • @RealisticResponse
      @RealisticResponse  5 місяців тому

      see last comment

    • @RealisticResponse
      @RealisticResponse  5 місяців тому

      @@kathbuerano7545 ask questions and I can answer.

  • @MarkPolo-yc1kl
    @MarkPolo-yc1kl Рік тому +1

    What is API KEY and how to get it

  • @rahulgagalani3390
    @rahulgagalani3390 Рік тому +1

    Hello,
    I've been trying to solve the CS50x problem since a month but I am still unable to. The only set left is this one. Is there any correct solution form where I can copy the code and learn from it. I'm really tired now.

    • @RealisticResponse
      @RealisticResponse  Рік тому

      The code in my previous video is a correct code. But it's long because this problem is a tough one for beginners. But if you watch the previous video it solve the entire problem. I do not have a copy paste solution.

    • @rahulgagalani3390
      @rahulgagalani3390 Рік тому +1

      @@RealisticResponse Cool!
      Would you be making a playlist on:
      CS50's Introduction to Programming with Python?

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      @@rahulgagalani3390 yes. I'm working on that. The growth of this channel and a vacation slowed me down but that one and cs50W as well

    • @rahulgagalani3390
      @rahulgagalani3390 Рік тому +1

      @@RealisticResponse Excellent, please keep it up. I'm interested in CS50's Introduction to Programming with Python for now.
      Thanks for what you do.

    • @RealisticResponse
      @RealisticResponse  Рік тому

      @@rahulgagalani3390 perfect! I'll keep them coming!

  • @zubijaved10
    @zubijaved10 Рік тому

    Hi devin . I have a question . We use export API_KEY use in update version in finance or not ?

    • @zubijaved10
      @zubijaved10 Рік тому

      Sir please make a video step by step finance like older video .

    • @zubijaved10
      @zubijaved10 Рік тому

      About keys and changing in new finance project

    • @zubijaved10
      @zubijaved10 Рік тому +1

      In update version finance .in quote i put Aplx then i cannot see any output beacuse i think he wants yahoo API_KEY what you think devin ? I cant see any error but i cannot see any output when i input Aplx in quote ?

    • @RealisticResponse
      @RealisticResponse  Рік тому +1

      the older video still works bud. This video is just to show that. The check50 never utilized the api key and you now dont have to use the api key and it's not built into the code so the old video works for the new update.

  • @_imsanjayr
    @_imsanjayr Рік тому

    hi bro can u send the github link

    • @RealisticResponse
      @RealisticResponse  Рік тому

      Hey there! Due to the academic honesty policy, my github is set to private. I'm happy to help as much as I can with any questions, but providing the code is not something I can do. Let me know where you're struggling and I'd be happy to help!

  • @jackmccarthy3133
    @jackmccarthy3133 Рік тому +1

    Hi Devin, can you post an updated link to your discord server? the invite in your bio has expired. Thanks!