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

  Рет қаралды 55,328

Devin Finley

Devin Finley

Күн бұрын

00:00 Intro, 01:48 Register, 06:11 Quote, 07:47 Buy, 10:35 SQL Update, 12:22 Index, 15:58 Sell, 19:07 History
Welcome to This is CS50 Week 9 Problem Set - Finance. This tutorial will cover how to complete CS50x Finance.
Don't forget to export API_KEY=value where "value" is your exact APK key starting with pk_. this is run from terminal $.
Then cd finance. You'll need 'flask run' and Ctrl+C will stop flask from running.
sqlite3 finance.db to alter SQL and .exit to return to /finance then back in to flask run.
Happy Watching!
NOTE! - to PASS the CS50 check, you NEED to implement the logic I left out in the def index portion of the app.py - you MUST have shares and totals down to two decimal points to clear the check. You may want to use the 'usd' function and or some 'float' logic. There are also other ways to solve this. Good Luck!

Пікірлер: 687
@RealisticResponse
@RealisticResponse Жыл бұрын
Critical UPDATE: The BUY function EXPLICITLY wants a "button" despite the form being in working order, you need to update the code as follows on buy.html (this is a modification only to the last line that turns the from click into a button to satisfy: Buy Shares: Symbol: Submit
@lpdemodimi
@lpdemodimi 8 ай бұрын
The issue with buttons actually now applies to all buttons in Buy, sell and quote. Just use for every button or check50 will turn red (tested in 2024) Crucial here is the type="submit", which the html seems to be tested/scanned for.
@RealisticResponse
@RealisticResponse 8 ай бұрын
@@lpdemodimi I love this quote - I haven't gotten the update for 2024 yet so THANK YOU for noting this!
@ayaanlalani8227
@ayaanlalani8227 7 ай бұрын
@@lpdemodimi hey I've done this but it's still showing me "expected button to submit form, but none was found."
@chaitanyadubakula
@chaitanyadubakula 4 ай бұрын
:( buy handles valid purchase expected to find "112.00" in page, but it wasn't found I'm having this problem even though I got the right text to appear in a flash message and the button to work.
@Sharveshaa
@Sharveshaa 4 ай бұрын
@@chaitanyadubakula same, even im getting it. did u figure out how to solve it?
@sanacuriosidad
@sanacuriosidad 8 ай бұрын
People having issues with the 2024 version,: there is a note for the index. The lookup function no longer returns a "name". Just delete ( stock["name"] = quote["name"]) from the code and also from the html table. Thanks Devin for all your great tutorials.
@RealisticResponse
@RealisticResponse 8 ай бұрын
I love this comment! I Hope everyone is reading this. thank you!!!
@aristzampaftis6828
@aristzampaftis6828 8 ай бұрын
I do not understand how it should be now implemented. Can you please help? My previous code was like this: for stock in stocks: quote = lookup(stock["symbol"]) stock["price"] = quote["price"] stock["total"] = stock["price"] * stock["shares"] total_price += stock["total"]
@RealisticResponse
@RealisticResponse 8 ай бұрын
@@aristzampaftis6828 gonna have to hop in discord and be patient but I'll help you figure this out: discord.gg/GeTqTCHA
@airsoftsh
@airsoftsh 5 ай бұрын
NOTE: taking this line out means that the colspan="4" NEEDS to be colspan="3" in BOTH spots, otherwise the check50 will give an error
@RealisticResponse
@RealisticResponse 4 ай бұрын
@@aristzampaftis6828 I need to know what error your getting - new discord link is: discord.gg/YPsWnFWW good for 7 days
@bookwormd8627
@bookwormd8627 10 ай бұрын
You are a literal godsend... I struggled so much with this problem set, like panic attack level and finding this video stopped me from giving up my entire 6 months journey. I cannot put into words how grateful I am that you chose to upload this video to help the thousands of people who like me struggled. I'm sure you already know from the hundreds of people thanking you that you are appreciated, but truly, thank you! On to final project!!!!!
@alialdalate4225
@alialdalate4225 10 ай бұрын
could you submit it bro? the code is working?
@josiahking2772
@josiahking2772 10 ай бұрын
Yo my whole project is working perfectly fine bruv did it all by myself but when I do check50 im getting an error on the buy page stating "buy handles valid purchase expected to find "112.00" in page, but it wasn't found" do you perhaps have a solution for this bruv???
@RealisticResponse
@RealisticResponse 10 ай бұрын
My pleasure! Thanks so much for the support! I'm so happy I was able to help! Appreciate you sticking with it till you found me an congrats on completing this!
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@alialdalate4225 respond to my comments no les than weekly - code still works - update video to prove it - you're good - just stick to it!
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@josiahking2772 This question is answered in the video 3 times, i put it in the description, and I've answered it on MANY comments - trust me that the answer you're looking for is MUCH simpler than you think but if you read other comments, I promise you'll get there.
@hi_eklavya
@hi_eklavya Жыл бұрын
I love how you are replying to every single person who has doubt even after 5 months of posting this video this is really great. I appreciate your efforts. Thank you so much for your work and dedication.
@RealisticResponse
@RealisticResponse Жыл бұрын
Lol coding as a beginner isn't easy. Some people just need reassuring. Thanks so much for the support! I really appreciate comments like this!
@DusKed
@DusKed 4 күн бұрын
Thank you Devin for this detailed video! You are an inspiration to myself and I am sure many others! thank you once again!
@daniellouis6665
@daniellouis6665 9 ай бұрын
It does indeed work. As for the part he tells you to do on your own, he drops a lot of hints. Thanks Devin.
@RealisticResponse
@RealisticResponse 9 ай бұрын
You are the BEST! well done and congrats! Hopefully I'll have more helpful stuff this coming year!
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@BSIAB
@BSIAB Жыл бұрын
Thank you! This was really helpful. It makes a hard an frustrating problem a good learning tool, there is a lot to learn by going through your video and the completed project. Once again thank you and congratulations for being a person that shares knowledge and helps others.
@RealisticResponse
@RealisticResponse Жыл бұрын
Hi! Helping others is a big deal for me. I'm so grateful for each comment and person out there letting me know I'm helping so thanks so much for the feedback!
@AnujKumarSharma-vh7pk
@AnujKumarSharma-vh7pk 9 ай бұрын
Great Video Brother!!! Thanks to you i am moving to final Project , Thank youuu!!!!! Keep this good work continue you will definitely Grow ❤❤❤❤
@RealisticResponse
@RealisticResponse 9 ай бұрын
All you my friend! Congrats on completing this! Happy I was here to be a part of this with you!
@saipandu9621
@saipandu9621 8 күн бұрын
bro can u help me out im stuck
@thebass2798
@thebass2798 9 ай бұрын
Dude you have been such a huge help and inspiration while i was taking this course. This video helps clear up a lot of things for me.
@khushiiyengar1424
@khushiiyengar1424 9 ай бұрын
On to your final project I suppose?
@RealisticResponse
@RealisticResponse 5 ай бұрын
Sorry for the delay - been away - but coming back to comments like these make all the difference in the world. I appreciate my subscribers and commenters and supporters more than they know - I'm glad I was able to help you out.
@rezamakvandi7404
@rezamakvandi7404 Жыл бұрын
thanks Devin. longest 22 minutes of my life 😀
@RealisticResponse
@RealisticResponse Жыл бұрын
I feel you - making this one was..... intense. Not the code (which wasnt fun) but the video - cutting out all the repeats and trying to trim it down. I did my best but MAN was it a big one. Congrats making it to the end!
@bernardokawano
@bernardokawano 10 ай бұрын
You are an angel and I wish all the best for you and your family. Keep up the great work and helping people, you are an incredible person, congratulations.💟
@RealisticResponse
@RealisticResponse 9 ай бұрын
Thanks so much! Congrats on making it this far!
@ut_fan8787
@ut_fan8787 Жыл бұрын
Late, but was CRYING and having a full on mental breakdown because I couldn't solve this and all the other tutorials took hours but didn't work. Then... A MIRACLE HAPPENED! I found this video and finished the pset in an HOUR and I am crying tears of joy THANK YOU SO MUCH FOR ENDING MY SUFFERING
@RealisticResponse
@RealisticResponse Жыл бұрын
@gusgtzbg6387
@gusgtzbg6387 Жыл бұрын
Allah Akbar 🙏
@Luci_19
@Luci_19 10 ай бұрын
Hey, I'm stuck on the sql part it keeps leaving at this ...> can you if don't mind help me out please?
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@Luci_19 make sure you first cd finance then sqlite3 finance.db then execute your command. Dont forget to get into the sql file first before updating anything in terminal
@CircleOfTheRighteous
@CircleOfTheRighteous 9 ай бұрын
make sure you end SQL commands with a semi colon;@@Luci_19
@Redpilllllll
@Redpilllllll 7 ай бұрын
Helped me out a TONNNNNN!!!!! Didn't officially enroll in cs50 but was using the entire course as a primer for my enrolled Comp Sci courses next month-I think all of this will lay an awesome foundation, and Devin I cannot quite frankly thank you enough for all of this. Smoothed out the major bumps in the road through a lot of the differing projects when I got stuck, and this last project was an absolute beast that would have taken me way WAY longer without your help. THank you so much my man
@RealisticResponse
@RealisticResponse 5 ай бұрын
I'm sorry to be so late to such a nice comment. I can't tell you how much I appreciate you letting me know that I've helped you. I'm glad you're done and hopefully, as I grow this channel, I can continue to contribute to your growth as a coder. Keep up the great work and thanks again!
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@Nataliia_9
@Nataliia_9 8 ай бұрын
Thank you very much for your hard work! I have learned so much and finally understood everything!
@RealisticResponse
@RealisticResponse 5 ай бұрын
Thanks so much for the support hearing that you understand is invaluable. Appreciate you so much and congrats!
@GenZ_01_
@GenZ_01_ 24 күн бұрын
Awsome bro . thanks ! for the short and clear explantions
@RealisticResponse
@RealisticResponse 21 күн бұрын
Recording this one was a nightmare - Thanks for your support! Appreciate you and congrats on making it this far.
@nicholaslydon7089
@nicholaslydon7089 5 ай бұрын
Bro you are a LIFE saver. Had most of it, but couldn't find how to reference the session's user_id for the life of me. Thank you!
@RealisticResponse
@RealisticResponse 5 ай бұрын
Happy to help! good job making it this far!
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@azipage
@azipage Ай бұрын
are you doing pset9 2024? did the code work for you?
@jou1105
@jou1105 8 ай бұрын
Thanks Devin! you are the 🐐
@RealisticResponse
@RealisticResponse 8 ай бұрын
Congrats on making it this far. Happy to help in your journey!
@ligachiga1
@ligachiga1 Жыл бұрын
Really though thanks for the video this is super helpful and Encouraging, I finished the lab then came to this one and was like "WUT"
@RealisticResponse
@RealisticResponse Жыл бұрын
This one is TOUGH dont feel bad. I see now why there's so few video helps for the whole course but this one especially. Good job making it through. Good luck on your project!
@nicolasvallejos2017
@nicolasvallejos2017 4 ай бұрын
Thank u for all of the help that u provided. Love the content and information. Hugs from Argentina
@BijouBakson
@BijouBakson Жыл бұрын
Submission criterias are so strict that even when the app is working as it should, there's still :( marks. Your work has certainly helped me as it's provided the reference I've needed. By the way, the proper way is to create a stock table and a separately transactions table. At every transaction you add stock AND update transactions accordingly. You return the content of the transaction table to /history table, and that of stock table to the root folder table, accordingly. This allows for purchase of the same stock many times at different values. As I stated above, your work was instrumental to help me move at critical stages. You are appreciated. Thank you.
@RealisticResponse
@RealisticResponse Жыл бұрын
In the video I mention 3 times that the money isn't formatted. And it's in the description as well. I did this on purpose because I want the user to find and update these things accordingly. This was a very simple task (as you noticed) so I wanted to make sure people could identify this error, and update it on their own.
@BijouBakson
@BijouBakson Жыл бұрын
Oh okay! I get you now. Did not really watch the video, I just went to a section that puzzled me. Now I edited the comment accordingly@@RealisticResponse
@inferno66629
@inferno66629 5 ай бұрын
thank you so much for the great help!!!! And your logic is crystal clear , admire you!! hope you all the best !!!
@RealisticResponse
@RealisticResponse 5 ай бұрын
Thanks so Much! Just getting back at it after a break and hope to bring you lots more helpful information! Appreciate you!
@jessipresten9042
@jessipresten9042 11 ай бұрын
This one hurt! Thank you for your help:)
@RealisticResponse
@RealisticResponse 10 ай бұрын
Here to help!
@Djxkhxhkxkgxiyxkb
@Djxkhxhkxkgxiyxkb Жыл бұрын
Thank you so much brother I appreciate you and your help, I have been struggling with this problem set until I found your account ✨ I am watching your videos from KSA 🇸🇦
@RealisticResponse
@RealisticResponse Жыл бұрын
Thanks! So happy I could help! I'm on to CS50W now and then after that I think maybe the MIT course but we'll see where the road takes us!
@anselmeatchogou
@anselmeatchogou Жыл бұрын
Thanks for your help ! 😇
@RealisticResponse
@RealisticResponse Жыл бұрын
Absolutely! My pleasure keep up the good work!
@raghadel-dieb8264
@raghadel-dieb8264 Жыл бұрын
Finally!!! Thank you you're awesome ❤
@RealisticResponse
@RealisticResponse Жыл бұрын
Let's go! Check the recent video for a giveaway. Gratz making it this far!
@tinosetiawan4974
@tinosetiawan4974 8 ай бұрын
That was awesome explanation Great! Thanks Finley
@RealisticResponse
@RealisticResponse 8 ай бұрын
Thank you so much and congrats on making it this far!
@brunopereira4643
@brunopereira4643 5 ай бұрын
Thanks man, your video helps a lot, I just saw the code to clarify some things, borrow ideas and do things that I was doing in 3 or more lines, just to review the logic to do it in one. This is for real a tough one as you said, but it's Cs50, we all know how difficult this course is. I think that despite making the codes work throughout the course, what bothers me most was making the code pass the test, I know that some tests are very useful, but in other cases the lines simply work but the tests go wrong, and you don't even knows where to look for this error, and in which case it is giving an error, even with the help of the course's AI. Anyway, thanks again.
@RealisticResponse
@RealisticResponse 5 ай бұрын
You're not wrong. I've made a few functional codes myself and they didn't "pass" CS50 algo. But I just kept re-working the code until something happened. Good work getting this far and 'hopefully' completing.
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@scarlet_208
@scarlet_208 Ай бұрын
Hello , I am facing an internal server error here in register can you please help I followed all the steps yet it' keeps showing error
@ErenEsinler
@ErenEsinler Жыл бұрын
Thank you :) You are a life saver
@RealisticResponse
@RealisticResponse Жыл бұрын
Thanks for the support! Almost done!
@sethtufte7660
@sethtufte7660 20 күн бұрын
This is an insane assignment for those of us who are taking this as an "introduction" 🤕
@RealisticResponse
@RealisticResponse 20 күн бұрын
@@sethtufte7660 I agree. It's a huge undertaking. Hopefully the video helps some. Even making this was massive for me
@artaround5717
@artaround5717 Жыл бұрын
Bro, haven't seen you in a couple of months since ps6 I guess. Thank you for making the code scale larger, the content is perceived in a completely different way.
@RealisticResponse
@RealisticResponse Жыл бұрын
My pleasure. Onnupdated videos when they come you should see improved visual and sound. Also for future courses. I appreciate the feedback and want to make sure these videos are helping . Glad to see you made it back around! Congrats on making it to the end.
@artaround5717
@artaround5717 Жыл бұрын
@@RealisticResponse Thanks Devin. It's been a long journey.
@reignofelohim
@reignofelohim Жыл бұрын
Great solution, before this vid I was stuck with an error 302 instead of status code 200. This pset was TOUGH. Thanks for the help.
@RealisticResponse
@RealisticResponse Жыл бұрын
Absolutely! Thanks for the shout out! This one wasn't easy but I'm glad you got through it! good job!
@garbsonsouza2c876
@garbsonsouza2c876 Жыл бұрын
hello friend, I'm sorry for not expressing myself well, I would never diminish your work, on the contrary I am very grateful for your help, without it I would not have been able to finish the course, thank you very much
@RealisticResponse
@RealisticResponse Жыл бұрын
I didn't think you were being disrespectful. I'm happy to help and will do whatever I can. This small thing was just more than i was or am able without a whole other video. I'm happy to help and happy to see you're completing the course! Thanks so much and dont worry. I'm here to help.
@dh4rkx634
@dh4rkx634 9 ай бұрын
I had this pset going well up until buy where everything got messy for me, but your explanation of how it works helped me a ton. thank you!
@RealisticResponse
@RealisticResponse 9 ай бұрын
Glad I was able to be a part of your success! Congratulations!
@barcode_artist
@barcode_artist Жыл бұрын
That one actually get to me pretty easy, even that I struggle at the more earliest psets...
@RealisticResponse
@RealisticResponse Жыл бұрын
That's great! This is a tough PSet that shows excellent growth that it's not difficult for you. Well done!
@khushiiyengar1424
@khushiiyengar1424 9 ай бұрын
I am so thankful for you. Today i will be submitting my final project and all thanks to you. This journey would have been impossible without your help. This pset was the most toughest but with your help i was able to do it. You're godsend
@achrafahlabbane849
@achrafahlabbane849 9 ай бұрын
Hello man iam too but I still have a problem I fnace it doesn't wana work
@RealisticResponse
@RealisticResponse 9 ай бұрын
Congrats! I'm Happy for you! we all need a little help sometimes. Happy i was able to be part of your journey!
@caiomac1
@caiomac1 Жыл бұрын
Nice video, bro! Thanks for the support, without these type of videos, we can't finish the course... :/
@RealisticResponse
@RealisticResponse Жыл бұрын
The course is difficult for true beginners I hope that these helped you understand better. Always good to re look at what you've done. The second time around is super helpful now that you have the know how. This is all about practice and redundancy. Good work!
@caiomac1
@caiomac1 Жыл бұрын
​@@RealisticResponse Yeah, totally agree. I'm on the first month studying computer science and I have to say that it was very difficult to me to understand all the stuff. Your videos helped a lot of people around the world, thanks! Hugs from Brazil!
@RealisticResponse
@RealisticResponse Жыл бұрын
@@caiomac1 man that's hugely appreciated! Thank you so much! Coding is all about working together. The internet was LITERALLY invented to advance science thanks to Tim Berners Lee. I'm for it and I'm here to help. Great job and keep up the good work!
@ripequetzalcoatyl_08
@ripequetzalcoatyl_08 11 ай бұрын
Thanks buddy this helped me a lot
@RealisticResponse
@RealisticResponse 11 ай бұрын
Congrats! Hope your final project goes well!
@AnimeCluster420
@AnimeCluster420 Жыл бұрын
Awesome been waiting for this lol
@RealisticResponse
@RealisticResponse Жыл бұрын
It has ARRIVED! lol took me some time hope it works.
@lalastarr6293
@lalastarr6293 9 күн бұрын
thank you so much for this video!
@Iquon1
@Iquon1 Жыл бұрын
You Da Man, Respect👍
@RealisticResponse
@RealisticResponse Жыл бұрын
appreciate you! good job finishing and good luck with your final project!
@Iquon1
@Iquon1 Жыл бұрын
@@RealisticResponse Thanks buddy, I am gonna need it.🙏
@RealisticResponse
@RealisticResponse Жыл бұрын
@@Iquon1 find me on discord if you need help! here for it. congrats again!
@Iquon1
@Iquon1 Жыл бұрын
@@RealisticResponse Thanks buddy, thats very kind of you🙌
@tadiwa2k11
@tadiwa2k11 2 ай бұрын
Such a legend for this, i was starting to get demotivated because I wasn't confident in my logic, but using your guide to proof check what I was doing helped alot with that. Your explanations made it so easy for me to understand what i was doing.
@RealisticResponse
@RealisticResponse 2 ай бұрын
Can tell you how much this means to me. I keep getting downhearted since making these. Not all of the feedback is positive and it gets tough trying to help people all over the world. But comments like this definitely keep me motivated. I appreciate you, and congratulations on making it this far!
@omarhoque1662
@omarhoque1662 2 ай бұрын
brother, can you tell me what he meant in 10:50 , how do I add the codes in the sql file? I wrote the codes in a seperate .sql file and kept it inside finance folder , then i went to sqlite3 and now what?
@RealisticResponse
@RealisticResponse Ай бұрын
@@omarhoque1662 I wrote a response on your other comment - hopefully it helps. but get into your sql file b entering the command sqlit3.db to enter the existing sql database (recall sql week and manipulation).
@leahsapkota9066
@leahsapkota9066 4 ай бұрын
THANK YOU SO MUCHHHH!!!!!!i've finally finished this pset!!!!
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@G17MSD
@G17MSD Жыл бұрын
hello! Great video. Just asking at 5:23 on Line 8 it states "url_for(register" is this the part where we paste the image or is this text necessary? Many thanks! 😁
@RealisticResponse
@RealisticResponse Жыл бұрын
Hi! The text is necessary. In that line (which we have on all .html files) the program is using html and flask to find and load your 'register' route/view. Its an html FORM that will POST a request to the listed url in the app.py file. Does that help?
@eyadedsm7834
@eyadedsm7834 Жыл бұрын
Hello brother, thank you for your efforts and I hope you will re-explain this problem because cs50 has updated it🙏
@RealisticResponse
@RealisticResponse Жыл бұрын
There's already an updated video. The changes to CS 50 do not affect the code. the code in this video is correct. Please feel free to watch the short video regarding the update.
@pranavkunisetty7967
@pranavkunisetty7967 Жыл бұрын
Thanks!
@RealisticResponse
@RealisticResponse Жыл бұрын
My pleasure! Keep up the good work!
@jessipresten9042
@jessipresten9042 10 ай бұрын
Hi Devin, when you are adding the transaction table am I inputting that information exactly. You had it on a notepad but where did you put the code?
@RealisticResponse
@RealisticResponse 10 ай бұрын
so you're going to update it in sql. In your terminal (just like when we did sql) you're going to type: sqlite3 finance.db that will open the sql database and you'll update the tables with that code. Once you're done just exit SQL and get back to the code. Does that help?
@jessipresten9042
@jessipresten9042 10 ай бұрын
Thank you! @@RealisticResponse
@jessipresten9042
@jessipresten9042 10 ай бұрын
@@RealisticResponse I put it in my terminal and got out of it ran flask run and it still isn't working. In my history on the website it isn't listing the transaction type. I have it in my html. and I have it in my updated table but it's still not showing up.
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@jessipresten9042 my pleasure!
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@jessipresten9042 It wont show up unless you sql it and look for it. you should be able to view it if you .schema what do you mean it's not showing up?? changes to sql dont just show up - they're built into the database so its not something we see unless we pull it up like i do in the video or run .schema or run .tables or something.
@Jamidhin
@Jamidhin 10 ай бұрын
Good work bro
@RealisticResponse
@RealisticResponse 10 ай бұрын
Congrats making it this far! Good luck with your final project!
@patrickfaudap7216
@patrickfaudap7216 Жыл бұрын
here are the errors I encounter after running your code : :( buy handles valid purchase expected to find "9,888.00" in page, but it wasn't found :| sell page has all required elements can't check until a frown turns upside down :| sell handles invalid number of shares can't check until a frown turns upside down :| sell handles valid sale can't check until a frown turns upside down
@RealisticResponse
@RealisticResponse Жыл бұрын
Hey there! So Here's some more hints - First, in the video i mention it about 3 times. Also - in the description there's a hint. This error means that your totals are not in 2 decimal point formats. To fix this you need to look at your app.py and use a function (see description) to make sure that your total's are giving you the results in just 2 decimal places. Also look to other comments here. I've had this question the most. I knew leaving it out would cause this, but i needed to leave some things up to the user. The basics of this go back to week 2 i believe so I'm certain once you see it, it will click. Just get that updated and you'll be good to go!
@davidninoaguirrecampis6617
@davidninoaguirrecampis6617 10 ай бұрын
@patrickfaudap7216 Where you able to solve the error? I have the same error and I've been trying and asking for help but no one has replied to my comment..can you help me please?
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@davidninoaguirrecampis6617 You replied to his comment but didn't read the comment I told him on how to solve it. There are dozens of answers I have here helping people solve this same problem. I recommend reading my replies and that might help you understand.
@meera.srivastava
@meera.srivastava 2 ай бұрын
I WAS STUCK ON THIS PSET FOR FOREVERRR. THANK YOU SO MUCH FOR THIS QUALITY CONTENT!! only suggestion would be to make a detailed video with deeper explanations if possible! that’s something that would help me soo so much to understand why we write certain code. ALSO, for those of you getting the :( on buy handles valid purchase, make sure to test this only after you have formatted the price to match the criteria (2 d.p.)! A hint for this is that you need to use the format function on your index.html!
@RealisticResponse
@RealisticResponse 2 ай бұрын
Since we're already in August, I'm waiting for the 2025 drop and plan to re-do the WHOLE course with better quality. I've improved my PC, My Mic, My Camera, all of it - hoping to do some better, deeper dives to help more people but THANK YOU for you're early support and comments!!!
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@meera.srivastava
@meera.srivastava 2 ай бұрын
@@cricfever_30 hey, i could try helping! what’s the issue!
@cricfever_30
@cricfever_30 2 ай бұрын
@@meera.srivastava bro send me your instgram I'd there we discuss, because I continue to get an error that's a reason. Please reply
@RealisticResponse
@RealisticResponse 2 ай бұрын
@@cricfever_30 how can i help?
@JohnMason-m1d
@JohnMason-m1d Ай бұрын
I have been on this pset for more than 3 weeks, your code really helped except for one final error in buy. :( buy handles valid purchase exception raised in application: KeyError: 'value' I think this is a problem with the API key but im not sure. If it is a problem with the api key then could someone please tell where you're getting yours. thank you
@RealisticResponse
@RealisticResponse 21 күн бұрын
Did you get this solved?
@ThwayThitTun-k2p
@ThwayThitTun-k2p 11 сағат бұрын
What is this error after modfified the button::( buy handles valid purchase Cause expected to find "112.00" in page, but it wasn't found Log sending POST request to /login sending POST request to /buy sending POST request to /buy checking that "112.00" is in page
@nightingale-z5g
@nightingale-z5g 10 ай бұрын
Hey Devin..!! its been over a week I'm working on finance but getting errors in sell function. some are those errors which I can't understand where I screwed up, when I execute check50 it even can't check any function.
@RealisticResponse
@RealisticResponse 10 ай бұрын
Hey there, you're not giving me anything to go off of here. I understand something is broken but you're kind of just telling me nothing is working. I can't really evaluate the depth of the issue. This should have take a while, over a week isn't uncommon - but you should have been testing at every stage and every html extension. if you did this then we can identify the error. or if you have an error message... but telling me nothing works is the same as telling me 'i have no code' - i just dont have anything to imagine where the problem is or could be.
@RayleSwift
@RayleSwift 2 ай бұрын
hello, thankyou for the video --> im a bit confused about the "index section" its showing error expected to find 112.00 something...... can you clarifify what to do to convert the number into USD? timestamp: 15:45
@RealisticResponse
@RealisticResponse Ай бұрын
All values need to be in USD format. I have to re-do this video explaining this since it's the Number 1 asked question. There should be lots of help here in the comments section since that one gets asked a lot. Hopefully previous comments can point you in the right direction.
@LucasBezerra-r8s
@LucasBezerra-r8s 9 ай бұрын
Hello Mr. Finley, is there any way that you can make a 2024 version? I tried using your code but it did not work. Thank you for your videos, I couldn't have done most of the course without you. Please consider making a 2024 version soon...
@RealisticResponse
@RealisticResponse 8 ай бұрын
:) app.py exists :) application starts up :) register page has all required elements :) registering user succeeds and portfolio page is displayed :) registration with an empty field fails :) registration with password mismatch fails :) registration rejects duplicate username :) login page has all required elements :) logging in as registered user succceeds :) quote page has all required elements :) quote handles invalid ticker symbol :) quote handles blank ticker symbol :) quote handles valid ticker symbol :) buy page has all required elements :) buy handles invalid ticker symbol :) buy handles fractional, negative, and non-numeric shares :) buy handles valid purchase :) sell page has all required elements :) sell handles invalid number of shares :) sell handles valid sale :) history page shows transactions As Of 08:50AM on 27, January 2024 this code still works. although, AS MENTIONED, you need to convert to USD - the only check that has been added is for a $28.00 on history page which, as mentioned in the video, means you have to convert "price" on your history page to 2 decimals. This code till works.
@LucasBezerra-r8s
@LucasBezerra-r8s 7 ай бұрын
@@RealisticResponse Thank you, sir. I'm very grateful for your help, have a great new year
@PatrickDucat
@PatrickDucat 3 ай бұрын
Not sure if anyone caught this yet but a critical piece you didn't note in your sell section is the number if shares should be a negative value 17:21 . This is in your code but not mentioned and easily missed. Thanks for the video.
@RealisticResponse
@RealisticResponse 2 ай бұрын
You're a gem. This video was several days of editing. I appreciate the feedback and looking out for others. There was bound to be a thing or two i missed so thank you for helping and supporting others.
@cricfever_30
@cricfever_30 2 ай бұрын
I need help related to finance project please reply me 🙏
@emp1re656
@emp1re656 Жыл бұрын
I got one question: In the Index function what's the point in having two variables total_value and grand_total that always have the same value?
@RealisticResponse
@RealisticResponse Жыл бұрын
Ok... hear me out.... ORIGINALLY I'm a finance major. So when I was writing the code I intended to use Total Value as the total value of just the stocks; and Grand Total as the value of the stocks AND the cash balance. As you correctly pointed out, in this code, total_value += stock_value grand_total += stock_value They ended up being the same. And this video took so long to make that I wanted to chuck my computer out the window. So I never went back and changed them to the parameters I originally meant to use. So... I knew i'd get called out eventually... but I was in too deep. lol and i left it. But that was the original plan.
@brandonhall6062
@brandonhall6062 11 ай бұрын
Hi you have been so helpful. Thank you for your help during this process. I am getting so close to finally finishing up and sadly im not able to get thought the problem of this last code. it keep coming up ":( logging in as registered user succceeds application raised an exception (see the log for more details)" not sure what that problem could be. could you help?
@RealisticResponse
@RealisticResponse 11 ай бұрын
didn't get a notification about this comment sorry. But the error is in your log. do you have an error you can update me on?
@mikeyfera
@mikeyfera Жыл бұрын
Thank you so much for the video, helped me understand the concepts a lot more but there is one error that keeps showing up and idk where. It's within the buy function as it says a float is not iterable and gives me a type error, although it says the buy handles the purchase. If you could point me in the right direction, that would be awesome! Thanks again
@RealisticResponse
@RealisticResponse Жыл бұрын
I can. Try defining float in your index function. Defining it early will clear most things up. Otherwise - consider using the built in 'usd' function. if that doesn't make sense - drop a line in the discord and I'll help get it sorted! you're almost there!!!
@CircleOfTheRighteous
@CircleOfTheRighteous 9 ай бұрын
im having some trouble with the quote part. When i click get quote, the correct quote names dont show it just shows whatever i typed for the quote name and symbol. Please help Devin
@RealisticResponse
@RealisticResponse 9 ай бұрын
I must be misreading this. When you lookup a quote it shows you the quote price right? I think I'm misreading this. If you can explain further I'll see what I can do.
@segidemir9491
@segidemir9491 10 ай бұрын
Hello, when I check, it keeps ask "buy say handles valid purchase expected to find "112.00" in page, but was't found? How can I solve this
@mario050488
@mario050488 10 ай бұрын
I have the same problem. Do you know how to solve it? Is it becuase of the decimals?
@RealisticResponse
@RealisticResponse 10 ай бұрын
I talk about this 3 times in the video and there's hints in the description and I've answered it dozens of times in the comments Please look to previous comments for help - it's a very simple addition to the code that you need. Please have a look around to see if any of the other previous comments or description help.
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@mario050488 I talk about this 3 times in the video and there's hints in the description and I've answered it dozens of times in the comments Please look to previous comments for help - it's a very simple addition to the code that you need. Please have a look around to see if any of the other previous comments or description help.
@dennou2012
@dennou2012 9 ай бұрын
Hello Devin, would you consider checking the 2024 version?
@RealisticResponse
@RealisticResponse 9 ай бұрын
I'll be updating all of these over the next month or so. Yes. Stay tuned
@RealisticResponse
@RealisticResponse 8 ай бұрын
:) app.py exists :) application starts up :) register page has all required elements :) registering user succeeds and portfolio page is displayed :) registration with an empty field fails :) registration with password mismatch fails :) registration rejects duplicate username :) login page has all required elements :) logging in as registered user succceeds :) quote page has all required elements :) quote handles invalid ticker symbol :) quote handles blank ticker symbol :) quote handles valid ticker symbol :) buy page has all required elements :) buy handles invalid ticker symbol :) buy handles fractional, negative, and non-numeric shares :) buy handles valid purchase :) sell page has all required elements :) sell handles invalid number of shares :) sell handles valid sale :) history page shows transactions Still works for 2024
@dennou2012
@dennou2012 8 ай бұрын
@@RealisticResponse thanks for your reply and checking the solution!!👏
@RealisticResponse
@RealisticResponse 8 ай бұрын
@@dennou2012 Congrats on making it to the end :)
@marcreaume8689
@marcreaume8689 Жыл бұрын
thanks again for this video! having a small problem. when I sell shares of a stock, say I sell 5 shares of (T) those shares are added to my total. so instead of having 5 shares ill have 10. any ideas? thanks!
@RealisticResponse
@RealisticResponse Жыл бұрын
Yes! it's in likely in the def sell function. Check lines (roughly) 285ish against my code and make sure that section is correct. Should be in the else function or the dbexecute below that.
@marcreaume8689
@marcreaume8689 Жыл бұрын
thanks! decided to do a total rewrite but when get back to that ill check it again! thanks for all your help, you should do paid 1on1 coaching or something man @@RealisticResponse
@marcreaume8689
@marcreaume8689 Жыл бұрын
ok so im looking at it now, and I think your lines go up to 273. I looked in else: quote = lookup(symbol) if quote is None: return apology("symbol not found") price = quote["price"] total_sale = shares * price db.execute("UPDATE users SET cash = cash + :total_sale WHERE id = :user_id", total_sale=total_sale, user_id=session["user_id"]) but didn't see an issue Maybe it above that? @@RealisticResponse
@miloss8513
@miloss8513 Жыл бұрын
Thamks broooo!
@RealisticResponse
@RealisticResponse Жыл бұрын
Happy to help! this one was a monster!
@Zsadigzade
@Zsadigzade Жыл бұрын
I have a question about this problem. I found this this problem very difficult, and to be honest, I couldn't do anything on my own. That's why I watched your tutorial. Since I've paid the fee for the verified certificate with a 90% discount from edX, I've been wondering: " Is me using most part of the code you provided in the video against the academic honesty? Can I lose my certificate because of it? " I really wanted to finish this course without any help from the internet, but it's just too difficult for someone like me who hasn't got a great CS knowledge. Could you shed some light on this point please?
@hi_eklavya
@hi_eklavya Жыл бұрын
No, you wont loose your certificate
@Zsadigzade
@Zsadigzade 11 ай бұрын
@@hi_eklavya Thank you, really relieving.
@RealisticResponse
@RealisticResponse 11 ай бұрын
My videos are meant as guides. But to answer your question let me ask you this. If you're in a group project at school. And there is a portion you dont understand, but as a team they help you and explain to you so that you DO understand. So you use the value they've given you. Do you view that as cheating? This video took me a LONG time to make and I've spent countless hours continuing to help people since posting it. the value of this video is to help you learn. not for you to copy - there are also countless changes you can make if this video helps you understand. But if you don't understand, how are you to learn and continue? I hop this better answers your question.
@jessipresten9042
@jessipresten9042 10 ай бұрын
Hi Devin, I have all the code and checked that my sql table was updated but I am still having trouble with my buy page. Here is my error :( buy handles valid purchase application raised an exception (see the log for more details). Everything else is working on the site.
@RealisticResponse
@RealisticResponse 10 ай бұрын
this should be in your buy function in app.py - theres something missing telling the program what to do when executing a buy - it has to do with the function that updates the sql to add a share and subtract the cost of it.
@joinjerrod938
@joinjerrod938 Ай бұрын
I'm having the same issue. How did you resolve??
@VinkkieZ
@VinkkieZ Жыл бұрын
In the history page, is the column Type supposed to be empty? Are we supposed to tell whether is a buy or sell transaction?
@RealisticResponse
@RealisticResponse Жыл бұрын
You could add buy and sell to the table but the + and - in front would indicate a buy or sell. but yes. I love the idea of adding this to the table.
@User-km4wk
@User-km4wk Жыл бұрын
Good work bro. Are you doing the lab one too?
@RealisticResponse
@RealisticResponse Жыл бұрын
Yes. I should have the lab up today or tomorrow! Sorry for them being out of order I missed the lab entirely
@WTDTravelChannel
@WTDTravelChannel Жыл бұрын
Please Help :) I am receiving error: :( logging in as registered user succeeds and log reason is: exception raised in application: RuntimeError: no such column: name. I tried updating sql by going through the steps you suggested with creating a new table but when I try to do that I get : Parse error: table transactions already exists CREATE TABLE transactions ( id INTEGER PRIMARY KEY AUTOINCREMENT, user_id INTE ^--- error here
@RealisticResponse
@RealisticResponse Жыл бұрын
no such column name implies the original built-in sql rows might be missing. when you open your sql and view tables you should have 2. The one you created and the one it came with. Can you verify both tables exist within the sql file?
@WTDTravelChannel
@WTDTravelChannel Жыл бұрын
​@@RealisticResponse thanks you are right I made a typo and added 'name' once I removed that word everything went through fine.
@RealisticResponse
@RealisticResponse Жыл бұрын
@@WTDTravelChannel Great work! good debugging! Congrats on making it this far!
@preciousadedamola8294
@preciousadedamola8294 3 ай бұрын
Thank you so much for your video it was helpful. I am having an issue with My login, it returned an error saying expected a 200 status code but got a 400 status code. What can I do
@fantasticearner3415
@fantasticearner3415 3 ай бұрын
Same
@fantasticearner3415
@fantasticearner3415 3 ай бұрын
Do you got any solution
@preciousadedamola8294
@preciousadedamola8294 3 ай бұрын
I also need help... been on that error for a week now
@RealisticResponse
@RealisticResponse 2 ай бұрын
​@@preciousadedamola8294 this is too vague i dont know where your error is. 400 means bad request. but i'm not sure where you're getting it. this is a whole application. the 400 could be getting thrown anywhere.
@RealisticResponse
@RealisticResponse 2 ай бұрын
@@fantasticearner3415 ​ @preciousadedamola8294 this is too vague i dont know where your error is. 400 means bad request. but i'm not sure where you're getting it. this is a whole application. the 400 could be getting thrown anywhere.
@DariusPhoon-r5v
@DariusPhoon-r5v Жыл бұрын
Hi there! Huge thanks for uploading this video, truly helped a ton! But now I'm facing an issue when I go to the drop-down to select the symbol of the stock I wish to sell. When I select the drop-down, none of my owned stocks appears for me to select. I definitely have the stock but I just can't choose any of it. Any help would be appreciated!
@RealisticResponse
@RealisticResponse Жыл бұрын
Have you considered not using the drop down method and switching it to an input stle box like the one you use to purchase shares? If the shares are owned and not in the drop down then perhaps an input method would solve this? You've already used one in your code so you could just switch it to that.
@DariusPhoon-r5v
@DariusPhoon-r5v Жыл бұрын
Thank you for the tip! That actually sounds pretty good, will give that a try. But for my learning purpose, would you have any idea as to why my owned shares just aren't appearing despite following your code? @@RealisticResponse
@xsenyus7521
@xsenyus7521 2 ай бұрын
hey so I have a problem. when i run check 50 this frowns: :( buy handles valid purchase expected to find "112.00" in page, but it wasn't found. do you know what that means?
@xsenyus7521
@xsenyus7521 2 ай бұрын
oh wait check50 is different from when you did it with your other video. hmmm.
@dorakonn8799
@dorakonn8799 Ай бұрын
Did you solve the issue? I am struggling the same error((
@RealisticResponse
@RealisticResponse Ай бұрын
​@@xsenyus7521 it is a bit different but the issue is the same. This comment is the number one question and there are lots of responses and comments that help solve it. I also mention this 4 times in the video. All values must be usd which is defined in the existing code. If you convert all values to usd this should solve your problem. If that doesnt make sense, look to previous comments as we've solved it many times. That should help.
@xsenyus7521
@xsenyus7521 Ай бұрын
​@@RealisticResponse Hello again, sorry for the late response but i managed to fix it which is great. Thank you so much man you helped me a lot!
@KpopChickenn
@KpopChickenn Ай бұрын
what is the grand_total variable for in the index function?
@RealisticResponse
@RealisticResponse Ай бұрын
A previous version I wrote. It doesn't serve a purpose. I was going in a different direction and left it in. but it is a dead line of code so shouldn't impact yours if you do not use. This video took so long to do, removing something I didn't end up using in the end became to tedious so it died in-line.
@MahmoonaKhan-l8b
@MahmoonaKhan-l8b 10 ай бұрын
hey there Devin! I really appreciate your work but I'm having a tiny problem in my register function. I don't know why but my register wont work like it wont register if I try. Is there a solution to my problem?
@RealisticResponse
@RealisticResponse 9 ай бұрын
Hi! I'm certain there's a fix but this problem is too general. I can't identify the issue just by knowing there's a problem. It seems pretty straight forward that the issue is in the register function or html but I couldn't say where. Also possible the sql file is corrupt - this happens from time to time
@MahmoonaKhan-l8b
@MahmoonaKhan-l8b 9 ай бұрын
thank you I was able to find the problem
@omarhoque1662
@omarhoque1662 2 ай бұрын
didnt understand what 10:50 was meaning , how do I add the codes in the sql file? I wrote the codes in a seperate .sql file and kept it inside finance folder , then i went to sqlite3 and now what? ( i think this is a rookie question but im working on this for 3 hours now)
@lgachaboyyt
@lgachaboyyt 2 ай бұрын
Sqlite3 finance.db in terminal
@omarhoque1662
@omarhoque1662 2 ай бұрын
@lgachaboyyt the code that he shows in text file...do i keep that code in a .sql file inside finance folder? I did that but it didnt work
@RealisticResponse
@RealisticResponse Ай бұрын
@@omarhoque1662 Hopefully everyone here is a bit of a rookie. In case you haven't figured this out yet - watch at 10:45. You have to enter the slite3.db command to get 'into' your sql file (recall your sql week). then enter the code to update sql, then back out of sql to get back into our regular file. You shouldn't be writing a new sql fie - there's already one there - having 2 can be problematic.
@rahulgagalani3390
@rahulgagalani3390 Жыл бұрын
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 Жыл бұрын
Hey there. I don't have a cheat sheet. This video can help you solve the issue. The code and explanation is all there. Don't feel bad if you have to take a break. But i don't have the outline as an answer sheet posted anywhere.
@balazsszabo3466
@balazsszabo3466 Жыл бұрын
Somebody please help me out. I'm getting the error under "buy handles valid purchase" ``` sending GET request to /signin sending POST request to /login sending POST request to /buy exception raised in application: TypeError: 'NoneType' object is not subscriptable ``` I went trough everything printed out every value, double-checked every condition and still cannot find what is the root of the problem. I'm not returning a None value to anywhere.
@RealisticResponse
@RealisticResponse Жыл бұрын
I can tell you with certainty; you're overlooking something. The error indicates a but function purchase which could be sql related, but you also may have errors in each portion of your signin, login, and buy. without seeing your code, it's difficult to discern but it sounds like a sql issue. You either aren't starting with the amount of money required, or adding shares to table, or reducing money from purchase - something like that. This code has worked for thousands of people. If you take your time, you'll find the error. This is part of programming is identifying bugs. something is missing. or tabbed wrong. or you used - instead of =. any of these could be the issue. you have to be patient with the code. My code and this video are a guide. by this stage in the course you should be able to read it. you should be familiar with debugging. read the error, read the code, be patient, and update accordingly. This is all part of programming. It's something you can't stand against and must embrace is this is the path you wish to take.
@Sailen_176
@Sailen_176 7 ай бұрын
buy said symbol not found :( buy handles valid purchase expected to find "112.00" in page, but it wasn't found
@ext1nct297
@ext1nct297 6 ай бұрын
Did you ever find a solution?Im having the same issue
@ext1nct297
@ext1nct297 6 ай бұрын
nvm I found the issue. I'm sure that you have already fixed it, but for anyone struggling in the future, you need to make sure that your index uses the "usd" function. {{ stock.price | usd }} {{ (stock.price * stock.total_shares) | usd }}
@ooddddoo699
@ooddddoo699 6 ай бұрын
@@ext1nct297 i have the same issue for days now...When you say "index" you mean that it needs to be displayed in usd format on the main page where index table is shown?
@RealisticResponse
@RealisticResponse 5 ай бұрын
You found the hidden key! Great work @ext1nct297 well done!
@RealisticResponse
@RealisticResponse 5 ай бұрын
He means the code on the index page needs to be converted to usd - I mention it several times in the video and in the description and multiple comments. convert your totals to usd and you'll be good to go
@MartimCosta-r3j
@MartimCosta-r3j Жыл бұрын
Hi Devin, Do you know what might be the problem for flask run not working? It work sometimes, but other times it just appears the message "This site can´t be reached" on the web. Thank you
@RealisticResponse
@RealisticResponse Жыл бұрын
Hi there, I can't imagine why flask would sometimes decide not to run unless there's an IP issue or a hardware issue. If the device you're using has ample specs then it may be an I.P. Issue. if you're running a lower grade compute it may be hardware related. otherwise, unfortunately, I'm not sure why you're having this error...
@samukelondlela3019
@samukelondlela3019 9 ай бұрын
Happy New Year Devin! Your discord link does not seem to be working,It keeps saying it has expired.Please share the link.
@RealisticResponse
@RealisticResponse 9 ай бұрын
discord.gg/SHHsQAKy
@mohamedberraghdach994
@mohamedberraghdach994 Ай бұрын
sorry can someone help me i got this error :( logging in as registered user succceeds expected status code 200, but got 500
@RealisticResponse
@RealisticResponse 21 күн бұрын
solve this yet?
@elacerar2088
@elacerar2088 Жыл бұрын
Hi, this video helped me greatly!! But I still cannot get rid of one error - the log says there is no such table: transactions. Do you know how I could fix that?
@RealisticResponse
@RealisticResponse Жыл бұрын
Sorry - somehow YT didn't notify me of this error. If you're missing 'transactions' then the SQL code hasn't been updated. Did you see the portion of the video where we updated sqlite3 finance.db ? we need to add transactions to the sql so it can be logged.
@elacerar2088
@elacerar2088 Жыл бұрын
@@RealisticResponse no problem thank you for replying! You were right, I just mistyped the name of the table and therefor the program couldn't find it :) Thank you again!
@pf6993
@pf6993 7 ай бұрын
Does this video also work for the 9th week of the cs50x course of 2024 and give us the correct answer?
@RealisticResponse
@RealisticResponse 5 ай бұрын
Last time I checked (Early feb) the answer is yes - I took a few months break and am getting back to all weeks and updating videos.
@chetnajoshi3637
@chetnajoshi3637 Жыл бұрын
Hi so for the sell function it tells me that it didn't return a valid response, it either returned none or ended without a return statement. I don't get what it means by "the view function"? What do you think I could have done wrong?
@RealisticResponse
@RealisticResponse Жыл бұрын
Ok this is a big one but could be something small. That error might mean that the sell either returning None explicitly (like using the return None statement) or ending without a return statement. The sell function should have two main branches: one for handling the form submission (POST request) one for rendering the initial page (GET request). The problem might be occurring if the function reaches the END of the else block without returning anything. One possible fix is, add a return statement at the end of the ELSE block to ensure that the function returns a response in all cases. So you might check the return apology or otherwise the return render template make sure they're in the right loops unlikely but possible is the return redirect. Here's a snippet of the possible location of the code: return redirect("/") return apology("symbol not found") # If the user visits the page else: return render_template("sell.html", stocks=stocks)
@alejandrorangel9509
@alejandrorangel9509 Жыл бұрын
Y r master!!!
@RealisticResponse
@RealisticResponse Жыл бұрын
Hahaha thank you! Appreciate you!
@aceislegendary
@aceislegendary Жыл бұрын
Make sure to (cash)| usd on every html!
@Nickstr-hk2xy
@Nickstr-hk2xy 11 ай бұрын
Hi for the sell page every dropdown option seems to be blank, as in its literally white space, this makes it so all symbols are invalid, not sure why. Stock Symbol {% for stock in stocks %} {{ stock['symbol'] }} {% endfor %} when I inspect the page it gives this:
@RealisticResponse
@RealisticResponse 11 ай бұрын
So i've noticed some users (like mac users) are having trouble with the drop down - instead of using the drop down tr coding your sell more like your buy - using input instead of drop down. Should help fix it.
@faariswheel5673
@faariswheel5673 4 ай бұрын
Whenever I click the sell button I am getting Internal Server error. In the terminal it says TypeError: The view function for sell did not return a valid response. The function either returned None or ended without a return statement. Any ideas on what the problem is?
@faariswheel5673
@faariswheel5673 4 ай бұрын
Nervermind, I fixed it.
@marlowsamuel4467
@marlowsamuel4467 2 ай бұрын
Why you don't show us the hole code only some parts And i have a question how can i make the flask for all them
@RealisticResponse
@RealisticResponse 2 ай бұрын
I don't show the whole code because people would come to this video to copy and paste. My channel is designed in a way to not make me feel like I'm helping people cheat, but helping them learn. That's the only reason I don't post the whole code as it would be like posting a solution. Hope that makes sense. As for your question, when you run flask it should run for all of hem if they're properly linked and you're in the correct directory. Perhaps I'm misunderstanding the question?
@davidninoaguirrecampis6617
@davidninoaguirrecampis6617 11 ай бұрын
Hi Devin @Devin Finley, I followed your video accurately but for some reason everything is yellow when I do the check50..Can you help me please??? I do not know what is wrong
@RealisticResponse
@RealisticResponse 10 ай бұрын
if you weren't testing at each stage it's going to be difficult to find the problem. I also don't see any errors that you mention so it'll be difficult to discern what problems there are.
@davidninoaguirrecampis6617
@davidninoaguirrecampis6617 10 ай бұрын
@@RealisticResponse I was able to solve it! Thank you for making the videos! This class would have been very hard without your videos. I had some errors in indentation and the buy error I just needed to look at the hints.
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@davidninoaguirrecampis6617 great work
@sabinevanadrichem4644
@sabinevanadrichem4644 Жыл бұрын
:( buy handles valid purchase expected to find "112.00" on the page, but it was not found. I get this from the check50 but how can I solve this?
@sabinevanadrichem4644
@sabinevanadrichem4644 Жыл бұрын
Or this: :( buy handles valid purchase expected to find "9,88.00" in page, but it wasn't found
@sabinevanadrichem4644
@sabinevanadrichem4644 Жыл бұрын
By check50 sell I get sell page has all required elements, sell handles invalid number of shares and sell handles valid sale but with all of these can't check until a frown upside down
@RealisticResponse
@RealisticResponse Жыл бұрын
Hey Sabine! One way is to update the app.py file using float logic and USD() I mention this twice in the video as well as in the description. This part is up to you. At this point in the class if you've been following along and following with my videos you should have the know how. You need to get your index to return totals in 2 decimal places - how you do that is up to you but it is required for the final.
@mondasoliman4171
@mondasoliman4171 Ай бұрын
Can y help me please it give me this bugs :( buy handles fractional, negative, and non-numeric shares application raised an exception (see the log for more details) :( buy handles valid purchase expected to find "112.00" in page, but it wasn't found :| sell page has all required elements can't check until a frown turns upside down :| sell handles invalid number of shares can't check until a frown turns upside down :| sell handles valid sale can't check until a frown turns upside down :| history page shows transactions can't check until a frown turns upside down
@RealisticResponse
@RealisticResponse Ай бұрын
This is answered in many many comments and referenced 4 times in the video. Please see other comments that will help solve this.
@luc_kht
@luc_kht Жыл бұрын
Can someone please help me I've been working on the project for several hours but I can't get rid of this error code: “expected to find "9,888.00" in page, but it wasn't found”. Thank you
@RealisticResponse
@RealisticResponse Жыл бұрын
Hey there! There are dozens of comments regarding this issue and I cover it twice in the video. In your app.py you need to implement the usd or float function to get your totals on income rounded appropriately. You're very close and this is early cs50 logic. You can get there. Use one of those two logics so that your balances are rounded to 2 decimal places.
@luc_kht
@luc_kht Жыл бұрын
@@RealisticResponse Thank you for the answer. Even though it's so easy, I still can't seem to figure it out. Can you please show me how to solve the problem?
@RealisticResponse
@RealisticResponse Жыл бұрын
@@luc_kht I can help you solve this but you have to hop in discord. I cant give you the answer but I can help get you there
@Hoangnhatquan10
@Hoangnhatquan10 10 ай бұрын
I followed you but the website still doesn't recognize me and I don't know what to do. You did a great job
@RealisticResponse
@RealisticResponse 9 ай бұрын
Thanks for the support. Your problem is too general though. This code works. It's been tested thousands of times at this point. So something is off in yours but I'm not sure what. If you can be more specific, i may be able to help.
@Hoangnhatquan10
@Hoangnhatquan10 9 ай бұрын
When I run flask run and click on the thhif file, it shows up on the website but it doesn't have a register or quote or buy or sell. The entire website is still the same as when I first opened the source code. Thank you bro. @@RealisticResponse
@Hoangnhatquan10
@Hoangnhatquan10 9 ай бұрын
When I followed you, you watched the video details, but after the code was finished, it was not linked together, what should I do? Please help. @@RealisticResponse
@KaylaPaul-v1n
@KaylaPaul-v1n 9 ай бұрын
Hi! When I try to buy shares the “shares must be a positive integer” but my code says “Elif not shares or not shares.isdigit() or int(shares)
@RealisticResponse
@RealisticResponse 5 ай бұрын
Sorry for the delay - been away - let me know if you still need help.
@clips1363
@clips1363 10 ай бұрын
Brother i want ask how when i create table they say transactions is error like what is missing ?
@RealisticResponse
@RealisticResponse 10 ай бұрын
This is covered in a few comments below. as well as in the video. your have to remember your SQL week. go into sqlite3 finance.db and update the changes necessary. in your terminal go into sqllite3 finance.db - update the sql database. it's explained in the video and sql should be part memory from your sql week - it's a very small update just to get the tables in
@clips1363
@clips1363 10 ай бұрын
​@@RealisticResponseso i should do in my terminal cd finance the sqlite3 fibance.db or sqlite3 finance.db directly aftter that like i put the create table transcations etc.. right?
@clips1363
@clips1363 10 ай бұрын
​@@RealisticResponse cuse when i click quote apal its great but then buy and sell and history not working i thinks its becuse sql not update i really want do it cuse its my last chance begore new year💔
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@clips1363 you have to click on the sql portion of the video and make sure you've made the changes to the database. It's all here. Go to the sql
@RealisticResponse
@RealisticResponse 10 ай бұрын
@@clips1363 cd finance sqlite3 finance.db Be in the finance folder first always a best practice.
@Mrcrossfire9999
@Mrcrossfire9999 10 ай бұрын
Hello i think i need your help, i did the code exactly like yours , but it gives me a error message saying " expected to find "9,888.00" i page, but it wasnt found" (i did exactly like yours because with my changes to your code it gave me the same error message) any help?
@RealisticResponse
@RealisticResponse 10 ай бұрын
I mention this 3 times in the video and in the description and in many, many comments. Its a very simple feature that I left out on purpose but if you read through some comments here you'll find the help you need to solve.
@장진오-e7q
@장진오-e7q 6 ай бұрын
print("Thank you Thank you Thank you Thank you!"*10000)😍
@RealisticResponse
@RealisticResponse 5 ай бұрын
thank YOU - appreciate your support! keep up the great work!
@cricfever_30
@cricfever_30 2 ай бұрын
​@@RealisticResponseI need help related to finance project please reply me 🙏
@day_ah
@day_ah 10 ай бұрын
Hey Devin! I was wondering if u could help me, I’ve already understood what needs to be updated to solve the “expected 112.00” but i can’t seem to get the code right, im really tight on schedule, could u help me?
@mawsonek7703
@mawsonek7703 9 ай бұрын
Have the same issue, did u figure it out?
@RealisticResponse
@RealisticResponse 9 ай бұрын
Hi Emily, I answer this 3 times in the video and in numerous comments on this thread. The answer is very simple, you're just overlooking something. There's even a hint in the description. Feel free to check other comments for a path forward. It's a simple fix I left out on purpose but do review and discuss on the video. Best of luck!
@RealisticResponse
@RealisticResponse 9 ай бұрын
@@mawsonek7703 Hi mawsonek, I answer this 3 times in the video and in numerous comments on this thread. The answer is very simple, you're just overlooking something. There's even a hint in the description. Feel free to check other comments for a path forward. It's a simple fix I left out on purpose but do review and discuss on the video. Best of luck!
@mawsonek7703
@mawsonek7703 9 ай бұрын
@RealisticResponse Hi mate, sorry, yeah, went through them all. The problem is I di that, and on the website, it only shows 2 decimal points, but the check50 thing doesn't see it that way. Thanks
@RealisticResponse
@RealisticResponse 9 ай бұрын
@@mawsonek7703 convert them all to usd you might need usd instead of float maybe cs50 updated that. The usd function is provided in the wget so maybe the expect you to use it now
@shreddie2110
@shreddie2110 Жыл бұрын
Hey Devin thank you so much for these videos they really helped me get through the tall grass! When I do flask run and open the cite it opens up but when I click on register it says "internal server error. The server encountered an internal error and was unable to complete your request. See terminal window." the terminal says this- "TypeError: The view function for 'register' did not return a valid response. The function either returned None or ended without a return statement." not sure why this is happening as I believe the code is right do you have any tips?
@RealisticResponse
@RealisticResponse Жыл бұрын
Common error that could get you hung up anywhere. The error message means that the view function for /register route didn't return a valid response. This usually happens when a function ends without a return statement or returns None. To resolve, review the /register function to make sure it's returning a valid response. Sounds like your code ends without a return statement. Fix: make sure you're redirecting the user to another page after completing the register function: else: return render_template("register.html")
@shreddie2110
@shreddie2110 Жыл бұрын
@@RealisticResponse okay that makes more sense thank you i’ll try it out!
@RealisticResponse
@RealisticResponse Жыл бұрын
@@shreddie2110 Keep up the good work! let me know if you need me - here to help not always fast but always respond :)
@shreddie2110
@shreddie2110 Жыл бұрын
@@RealisticResponse Hello again so I added that and I rewatched the video the code is good now but it still doesn't work. I think it might be because of my folder/files. in the video you mentioned about adding folders for the .HTML files. Im a bit confused on that and think that's the issue, do you think you could explain that part a bit?
@RealisticResponse
@RealisticResponse Жыл бұрын
@@shreddie2110 You should have a basic waterfall where your templates folder (nested in the finance folder) nests all of your .html file for the various pages you create.
@fitofficial6510
@fitofficial6510 10 ай бұрын
Issue found, I followed the same things that you did but after selling shares, number of shares is not reducing, you did something that you haven't showed here
@RealisticResponse
@RealisticResponse 10 ай бұрын
Hi there. I assure you that's not the case. The issue is in the sql command for your sell shares. I made sure not to leave anything out - I was recording my screen the entire time and content was only shortened for speed but nothing critical was left out. This code and the functions within I've tested hundreds of times. The Issue is most likely in line 259(ish) on the db execute
@fitofficial6510
@fitofficial6510 10 ай бұрын
@@RealisticResponse brother, I solved it. By the way, after changing this line, it works: db.execute("INSERT INTO transactions (user_id, symbol, shares, price) VALUES(?, ?, ?, ?);", session["user_id"], symbol, -shares, -price)
(CS50) FINANCE - PROBLEM SET 9 | SOLUTION
1:34:48
Dors Coding School
Рет қаралды 71 М.
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,6 МЛН
MY HEIGHT vs MrBEAST CREW 🙈📏
00:22
Celine Dept
Рет қаралды 77 МЛН
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 41 МЛН
finance - CS50 Walkthroughs 2021
20:37
CS50
Рет қаралды 93 М.
CS50 Birthdays | CS 50 Week 9 Lab Birthdays | Beginners Guide 2024
14:51
Why Agent Frameworks Will Fail (and what to use instead)
19:21
Dave Ebbelaar
Рет қаралды 75 М.
HarvardX CS50: Finance - Part 3
25:56
Alexandrina Mehandzhiyska
Рет қаралды 27 М.
I reverse engineered Next to find what they are hiding
29:48
Theo - t3․gg
Рет қаралды 5 М.
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 69 М.
(CS50) FIFTYVILLE - PROBLEM SET 7 | SOLUTION
31:23
Dors Coding School
Рет қаралды 13 М.
HarvardX CS50: Finance - Part 1
17:13
Alexandrina Mehandzhiyska
Рет қаралды 38 М.