CS50 Problem Set 1 - Cash Solution 2023 Update (Step by Step Walkthrough for Beginners)

  Рет қаралды 106,245

CS50 Made Easy with Rahul

CS50 Made Easy with Rahul

Күн бұрын

Пікірлер: 277
@shapedurango
@shapedurango 2 жыл бұрын
Yo man! This is so good, I was struggling so much to understand what was needed, and I didnt want to just submit without understanding, but your explanation was perfect, and I was able to follow along without any confusion and feel like Im starting to grasp the course now. I'll be tuning in the rest of the way! Thanks for this :)
@Jay-ot1wi
@Jay-ot1wi 2 жыл бұрын
how is it going man did you finish it?
@jakespringer6926
@jakespringer6926 2 жыл бұрын
I want to thank you for doing these walkthroughs. You are truly a great teacher and help to make the solutions to these problems very clear. I hope that you will continue to do these for all of the remaining problem sets. It is of great value.
@the_gaynadian
@the_gaynadian 3 ай бұрын
I felt so dumb before I found these videos. Going from scratch straight into this with no prior experience was wild. Watching and writing beside these videos made me understand exactly what was needed. Thank you!!!!
@akottens
@akottens 2 жыл бұрын
I keep coming on here confused on small things for the program, and I want to truly grasp the program and what is happening within it before I send it in, and your videos help me to have that "oh my god I get it" moments over and over again. Thanks!
@samanthapadilla498
@samanthapadilla498 2 жыл бұрын
you are god send. i was so lost but after watching your video on mario i was able to finally submit my assignment. i am glad you do the walk through.
@animeworldamv5052
@animeworldamv5052 3 ай бұрын
The problem is not u don't submit your assignment, the problem is when your just copy past it doesn't make you a programmer you have to fight till u do it yourself at least if u didn't do it u tryed but at the end your gonna feel comfortable.
@wakulovszki
@wakulovszki 2 жыл бұрын
Thank you for explaining! I don't think I could've figured it out on my own. Keep up the good work!
@JazminMoniqueDR
@JazminMoniqueDR 2 жыл бұрын
me either, I'm staring at the assignment so clueless but motivated lmao
@diogoduarte2010
@diogoduarte2010 2 жыл бұрын
Thank you so so much for explaining along the way. I could "do it" with any walkthrough but would not understand it as much as I did with your explanation. This is not only a tutorial, but a second chance for me to get my dream work. Cheers from Portugal
@artur2.043
@artur2.043 2 жыл бұрын
I’m being a bit greedy but your explanations are very easy to follow! Could you do a walkthrough of credit? I found some other explanations on YT but they were quite confusing. :)
@issymunter
@issymunter 3 ай бұрын
I was literally on the verge of tears before these videos, thank you!!!
@stiguybob793
@stiguybob793 2 жыл бұрын
Thank you so much!!! You are so good at explaining these topics and breaking them down in a very logical and efficient manner!!! Liked and subbed. Looking forward to your next video!! Bye David!!! ;)
@frhealthfitness5067
@frhealthfitness5067 2 жыл бұрын
Thank you so much! You are helping so many people here!
@TheLeanoni
@TheLeanoni 2 жыл бұрын
For each function you can simply divide cents by the correct value of that coin. For example in the function for quarters just type " return cents / 25; ". Since we are working with integers the result of the division will be the amount of quarters you will need. It should look like this: int calculate_quarters(int cents) { return cents / 25; }
@sandipsubedi9131
@sandipsubedi9131 2 жыл бұрын
Omg I did the same thing. It does give you the correct output but i had to check whether the method was actually correct or not.
@jandrikogerbsch7301
@jandrikogerbsch7301 2 жыл бұрын
@@sandipsubedi9131 same here :D
@ismailaf3634
@ismailaf3634 2 жыл бұрын
that was smart
@Wumbology10
@Wumbology10 2 жыл бұрын
@@sandipsubedi9131 Same, but I kept getting errors
@Wumbology10
@Wumbology10 2 жыл бұрын
@@sandipsubedi9131 Nvm it worked
@KenTakahashiYT
@KenTakahashiYT 2 жыл бұрын
You are a wizard! Thanks for the help!
@TalkThisOut
@TalkThisOut 2 жыл бұрын
thank you for walking me down the logic and code, i got overwhelmed and had to look for help!
@courtneyc.7084
@courtneyc.7084 Жыл бұрын
This was incredibly helpful, I was having such a tough time with this problem set. Thank you so much!
@hefferdoodles9938
@hefferdoodles9938 2 жыл бұрын
Mine worked simply by making the return values for each of the calculation functions equal to cents / the amount of cents that the particular coin was worth. For example, to calculate quarters is: return cents / 25; This worked for me and it takes a lot less code to accomplish.
@yukitomay
@yukitomay 2 жыл бұрын
This was very helpful, thank you!
@ravenheart369
@ravenheart369 Жыл бұрын
okay there you go 1 subscriber for you the material is absolutely beyond word keep doing this great content thank you
@BenvelMusic
@BenvelMusic 2 жыл бұрын
you really saved me headache math was always hard and to translate math into the logic of programming is super new to me... thank you. bought you a coffee =)
@bluezebra6701
@bluezebra6701 2 жыл бұрын
I love how you go through and explain things, I mostly do these by myself but it's nice to be able to check that I'm on the right track
@jarvis_kjellberg
@jarvis_kjellberg Жыл бұрын
I did every thing with do while loop. After seeing the vid my code was much cleaner. It's always a challenge when I have to do everything on my own from scratch on my installed version of vs code with no direction so you make things a lot easier blud!
@kubataiupov1245
@kubataiupov1245 Жыл бұрын
Thanks man. I solved it , before I wacthed this video and your explanations are awesome!
@mehmetyigit7787
@mehmetyigit7787 Жыл бұрын
bro it makes sense now. I did more simply. I divided input to each number. It was acceptable anyway but I like yours more
@eduardomantillaparra8256
@eduardomantillaparra8256 Жыл бұрын
muchas gracias amigo, te agradezco tu apoyo y explicación, es muy fácil de entenderte y al mismo tiempo resuelvo los problemas. estoy haciendo el curso por internet. saludos desde Santander, Colombia
@jacobreed2709
@jacobreed2709 2 жыл бұрын
Thank you for making the 2022 update! Great walkthrough
@dustinlee8977
@dustinlee8977 Жыл бұрын
Always detailed in why you are doing what you are doing. Coming from a beginner, thank you for the clarification.
@Andoi117
@Andoi117 Жыл бұрын
Bro thank you for existing! I'm always 1 easy step away but cant figure it out. You help so much!
@enchantedbeauty875
@enchantedbeauty875 2 жыл бұрын
Thank you sooo much was struggling so much!! this really helped!
@Mxh_008
@Mxh_008 4 ай бұрын
thank you so much for these vids, so helpful and explained thoroughly.
@ali-xperia71
@ali-xperia71 7 ай бұрын
WOW, you are a legend! keep up the good work!
@YomaHosamKhadam
@YomaHosamKhadam Жыл бұрын
Bro! You're amazing, please keep up with your work and upload more videos. Thank you so much, you're a lifesaver.
@chefjonsf
@chefjonsf 2 жыл бұрын
Thank you for the thought process in approaching these problems. I honestly don't know where I would begin.
@barry0719
@barry0719 2 жыл бұрын
thank you very much for the help
@ciaranbusiness
@ciaranbusiness 3 ай бұрын
Thank you sir, I have learned a lot from you.
@beatrizsobczynski8556
@beatrizsobczynski8556 2 жыл бұрын
Hey Rahul, you are the best! Thank you very much
@Music-Books
@Music-Books Жыл бұрын
I love this explanation. This is clear and concise.
@burgerkingsans
@burgerkingsans Жыл бұрын
can we just give this man A ROUND OF APPLAUSE for helping out all the struggling students
@SP_PLAYS_YT
@SP_PLAYS_YT 2 жыл бұрын
i've been stuck in this problem for days man, Thank you soo much!!!!
@FloydianDip
@FloydianDip 2 жыл бұрын
You're a genuis guy. You made it so easy and very logical. God Bless!
@mohamedfares1
@mohamedfares1 7 ай бұрын
You are the BEST!!
@epic8498
@epic8498 Жыл бұрын
you are the best man, keep us going
@almightyHammer
@almightyHammer 2 жыл бұрын
Thanks a lot dude. I actually figured it out just by watching the first 2 minuets of the video : ))
@code_questing
@code_questing 2 жыл бұрын
yeah same
@juanGuzman-pl2xu
@juanGuzman-pl2xu 2 жыл бұрын
Thank you for posting the new peoblems! You are amazing hope everything goes great for you my friend!
@Azron2190
@Azron2190 2 жыл бұрын
Thank you so much. Completely new to all of this and you just explain things so well!
@comm1nd
@comm1nd 2 жыл бұрын
my brain was so smooth i used 0.25 , 0.1 etc.. thanks a lot for making me look dumb but i learned something
@kianaahmadi1198
@kianaahmadi1198 2 жыл бұрын
You made it easy! Thank you ,please keep going
@ago255
@ago255 2 жыл бұрын
Your explanation is very clear and easy to follow, thank you so much. Looking forward to the credit problem set walkthrough. Keep up the good work!
@RealJapanHD
@RealJapanHD Жыл бұрын
Great video! Have you uploaded a step-by-step guide for solving the credit problem?
@kyland719
@kyland719 Жыл бұрын
Thanks bro, this really helped clear up what exactly the functions are doing
@jacobdelatorre4785
@jacobdelatorre4785 2 жыл бұрын
Thank you so much. you walk us through the problem AND give such good explanations so we UNDERSTAND the concepts. Keep up the good work.
@Liam-10
@Liam-10 Жыл бұрын
Please keep sharing these problem solutions 🙏🙏🙏❤️❤️❣️
@ecstasik
@ecstasik 2 жыл бұрын
You don't need the loop in any functions, because in main() they make it through cents = cents - quarters * 25; For example, 60 cents, after return 2 quarters then cents = 60 - 2*25 mean cents = 10; So dimes will be 1 and then cents = cents - dimes * 10 aka cents = 10 - 1* 10 mean cents = 0; And there wont be nickels and pennies. Anyway, good vids. Thanks int calculate_quarters(int cents) { // TODO int quarter = cents / 25; return quarter; }
@alishadow9801
@alishadow9801 2 жыл бұрын
that's worked for me thanks
@toddhurley5629
@toddhurley5629 2 жыл бұрын
Correct me if I’m wrong but I didn’t find it necessary to declare int quarters. This worked fine for me. Int calculate_quarters (int cents) { return cents / 25; }
@AdonayFloresLaMota
@AdonayFloresLaMota 2 жыл бұрын
Thank you
@okcgaming6543
@okcgaming6543 2 жыл бұрын
same
@southmcwow
@southmcwow 2 жыл бұрын
Can you explain how exactly you identified this to be a loop? I’m brand new to programming and I’m not sure how you determined it. Thanks.
@user.Icarus
@user.Icarus Жыл бұрын
I actually got this to work on the first try, just using some common sense, but I still don't understand how it all works. I think it's because I'm not used to the code being so separated lol, but I'm hoping you explain the steps of what is happening in this video. Edit: Okay, 3 minutes in and you completely made me understand what was happening. Thank you.
@actionreplay2165
@actionreplay2165 2 жыл бұрын
Thank You, thank you your explanation and walkthrough helped me understand better how to call functions, I was so confused before starting the problem, you are a gentleman and a scholar, we are all in this together and some have better skills and grasp; Thank you again for carrying a brother through.
@omaralzaidi5458
@omaralzaidi5458 Жыл бұрын
thank you bro from my heart.
@cawai2815
@cawai2815 2 жыл бұрын
Thank God you exist!
@chidebrutechs
@chidebrutechs 2 жыл бұрын
You made jump over the hump, great explanation. Thanks
@Bobote809
@Bobote809 2 жыл бұрын
thank you so much man really!! from the whole community..
@NicholasJamesWinfrey
@NicholasJamesWinfrey 2 жыл бұрын
This video was great. You should really make more of them.
@elinamdoraashley882
@elinamdoraashley882 Жыл бұрын
Good thank you very much...😊
@linuxka
@linuxka 2 жыл бұрын
You’re really awesome man! Thank you 😊
@IlieAlexandruFlorea
@IlieAlexandruFlorea 2 ай бұрын
u saved me brother!!!!
@sjxy-gq9sb
@sjxy-gq9sb 2 жыл бұрын
Works well!! DANKEEE
@codeandtech77
@codeandtech77 6 ай бұрын
Anyone who doesn't understand how the math in the variables/functions work, remember the BODMAS Rule, the computer or specifically the C language also uses the same technique to calculate the answer, so in the quarters part where he tells us that cents = cents - quarters * 25, where cents = 68, he really means that first multiply quarters with 25, then minus the answer with the cents given (2 * 25 = 50, 68 - 50 = 18). 4:38
@alitm7333
@alitm7333 2 жыл бұрын
you really help me to imporve my skill and knowledge ! thank you so much
@shambhvilokre
@shambhvilokre Жыл бұрын
THANKYOU SO MUCH
@eq104eerly9
@eq104eerly9 2 жыл бұрын
you are the best
@abdallaalhaedre2287
@abdallaalhaedre2287 2 жыл бұрын
thanks man you really made it so easy
@zixinzhang4296
@zixinzhang4296 2 жыл бұрын
Very well explained! 😇
@roelofwillems
@roelofwillems 2 жыл бұрын
You are a rockstar!
@AdonayFloresLaMota
@AdonayFloresLaMota 2 жыл бұрын
Thank you for the explanation!
@KiraCuraMusic
@KiraCuraMusic Жыл бұрын
I hope you keep making more videos! :)
@juanelointriago
@juanelointriago 2 жыл бұрын
Thanks for the help. You are amazing !
@el-sayedel-senosy1749
@el-sayedel-senosy1749 2 жыл бұрын
thx bro the definition of the real teacher should be u!!!
@BlackCat-lz5tr
@BlackCat-lz5tr 10 ай бұрын
You could devide by the value of the coin in the function for instinct you can devide quarter to cents / 25
@Ahmed-jl7uh
@Ahmed-jl7uh 2 жыл бұрын
Thanks, video came just in time :)
@kingdavid5796
@kingdavid5796 Жыл бұрын
Thank you for this amazing video. Just subscribed to your channel I wanna know if you can also use a for loop in place of the while loop in this pset1
@Rohan-dw6uv
@Rohan-dw6uv Жыл бұрын
Yes I was thinking about this too! I have tried it but somehow it's not working but it could.
@mirandahouchens6508
@mirandahouchens6508 Жыл бұрын
My question is about this too - I tried this way on my own and couldn’t get it to work. Otherwise the code was so similar to the example here, so I’m curious to understand why the for loop didn’t work.
@sub.owen.create
@sub.owen.create 2 жыл бұрын
Great explanation as always, many thanks
@andreviniciusbezerradasilv9335
@andreviniciusbezerradasilv9335 2 жыл бұрын
thank you brother
@Luiz_Aquino
@Luiz_Aquino 2 жыл бұрын
Thank you my brother
@lut1748
@lut1748 9 ай бұрын
tysm this helped a lot
@artyomd8842
@artyomd8842 2 жыл бұрын
Hello. Thanks for the video. I did it in other way. Not that well designed, but it took less lines of code. Here's an examples for quarters: -- int quarters; quarters = cents / 25; cents = cents - quarters * 25; return quarters;
@okcgaming6543
@okcgaming6543 2 жыл бұрын
I just did int q: q= cents/25; return q; I think the code already written for you takes care of updating the value of cents so the 3rd line in your program isn't needed.
@artyomd8842
@artyomd8842 2 жыл бұрын
@@okcgaming6543 will try this.
@qiqi4830
@qiqi4830 2 жыл бұрын
@@okcgaming6543 what would the code be like for dimes? A hint please
@okcgaming6543
@okcgaming6543 2 жыл бұрын
@@qiqi4830 dimes are 10 cents while quarters are 25, u got this
@s.x.mu123
@s.x.mu123 Жыл бұрын
gracias por tu video amor me salvaste mucho tiempo
@maxim5519
@maxim5519 2 жыл бұрын
Thanks for great explanation of the task. I'm able to do code myself, but can`t catch task idea.
@aleksazlatkovic4663
@aleksazlatkovic4663 2 жыл бұрын
Thank you so much. It is THE BEST VIDEO out there. I have only one question. What's the purpose/use of "return quarters/dimes/nickles/pennies"? I know they return something, but how do they do it? In the 2021 version I did it without "return" and it worked. So, I feel like "return" is redundant, but I am probably wrong. Could you help me please? 😊😊😊😊😊😊
@enriqueavila8669
@enriqueavila8669 10 ай бұрын
Before watching this video, I have my program good but I have a bunch of integers, feeling like it could all be tossed into some loop.. came here to see a different way of going about it. I get the correct outcome at the end of running the code, just feeling like the coding if repetitive
@YuliAShares
@YuliAShares Жыл бұрын
thank you so much
@kristaniagunawan4509
@kristaniagunawan4509 2 жыл бұрын
Hmm, I was just wandering, I'm pretty bad at answering the Cs50 assignment, and am actually wandering if it's okay to search for hints and help for Cs50 stuff. I am open to advice from those whose done cs50 before, thanks! Oh and, great explanation man!
@ReplayMastersTekken
@ReplayMastersTekken Жыл бұрын
i guess it's okay as long as you understand the code... also you literally have to read all the notes and watch short videos
@kristaniagunawan4509
@kristaniagunawan4509 Жыл бұрын
@@ReplayMastersTekken Ooo okayy, thanks :)
@DevoutJourney
@DevoutJourney 2 жыл бұрын
Thank you so much!
@نوافالدوسري-ن7ن
@نوافالدوسري-ن7ن Жыл бұрын
Thanks❤
@الطيبعثمان-ظ6ف
@الطيبعثمان-ظ6ف 2 жыл бұрын
thanks a small word for your work 🔥
@cjplabs
@cjplabs Жыл бұрын
Why did you make an entire loop for simple division? I used: int calculate_dimes(int cents) { int dimes; dimes = cents / 10; return dimes; } And the same code for all other coin types, that passed all of the check50 tests and uses way simpler code. Division on ints will not return decimal values or the remainder, just the wholest number, so it never fails. Genuinely curious if there is a reason to use looped subtraction instead of just division? Thank you!
@iamwatari4088
@iamwatari4088 Жыл бұрын
wait how did you get all that text and coden preloaded like that., i also dont understand how you actually got the system to return a single value to the user. i cant get it to return anything.
@Mai_Tai_Meyers
@Mai_Tai_Meyers 2 жыл бұрын
appreciate the help!
@Blueprint4Murder
@Blueprint4Murder Жыл бұрын
So I am a coding noob when I did my logic I did it with division without a loop. While I understand what you have done would I be able to express the problem using division? Would it be more or less efficient?
@FrameRated
@FrameRated 2 жыл бұрын
So strange. I have followed this guide to the T, even starting over to make sure I didn't accidently change something and I cannot get it to work. I get really large negative numbers that aren't correct or the program will reply with a blank space when I hit enter. I am not sure what I am doing wrong.
@abdirahman55
@abdirahman55 2 жыл бұрын
really thank you
@lexluthor8
@lexluthor8 2 жыл бұрын
Thanks
@Stevestray13
@Stevestray13 2 жыл бұрын
Thanks for this. Can you please do an update on the caesar problem set. We need to create 2 custom functions, one for rotate and 1 for only_digits. Thanks!
@malulopes5035
@malulopes5035 Жыл бұрын
Thanks so much for always going through these like my brain is the size of a raisin. 😂😍
@RoylCJ
@RoylCJ 2 жыл бұрын
You are a saint
CS50 Problem Set 1 - Mario Walkthrough (Step by Step for Beginners)
18:23
CS50 Made Easy with Rahul
Рет қаралды 247 М.
CS50 Problem Set 2 - Caesar (Step by Step Walkthrough for Beginners)
25:50
CS50 Made Easy with Rahul
Рет қаралды 83 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Testing with Deno
2:47
Deno
Рет қаралды 2,3 М.
2025 MIT Integration Bee - Finals
33:54
MIT Integration Bee
Рет қаралды 36 М.
Computer Scientist Answers Computer Questions From Twitter
14:27
CS50 MARIO LESS - PROBLEM SET 1 | SOLUTION
22:06
Dors Coding School
Рет қаралды 9 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 277 М.
CS50 - Week 1 2024 Mario (Less Comfortable) | Walkthrough Guide
27:46
CS50 Problem Set 1 - Cash Walkthrough (Step by Step for Beginners)
10:10
CS50 Made Easy with Rahul
Рет қаралды 55 М.
(CS50) CREDIT - PROBLEM SET 1 | SOLUTION
37:16
Dors Coding School
Рет қаралды 37 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН