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

  Рет қаралды 102,687

CS50 Made Easy with Rahul

CS50 Made Easy with Rahul

Күн бұрын

Пікірлер: 272
@the_gaynadian
@the_gaynadian 20 күн бұрын
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!!!!
@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.
@issymunter
@issymunter Ай бұрын
I was literally on the verge of tears before these videos, 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 9 күн бұрын
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.
@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 Жыл бұрын
@@sandipsubedi9131 same here :D
@ismailaf3634
@ismailaf3634 Жыл бұрын
that was smart
@Wumbology10
@Wumbology10 Жыл бұрын
@@sandipsubedi9131 Same, but I kept getting errors
@Wumbology10
@Wumbology10 Жыл бұрын
@@sandipsubedi9131 Nvm it worked
@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. :)
@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
@KenTakahashiYT
@KenTakahashiYT Жыл бұрын
You are a wizard! Thanks for the help!
@courtneyc.7084
@courtneyc.7084 10 ай бұрын
This was incredibly helpful, I was having such a tough time with this problem set. Thank you so much!
@ciaranbusiness
@ciaranbusiness Ай бұрын
Thank you sir, I have learned a lot from you.
@frhealthfitness5067
@frhealthfitness5067 2 жыл бұрын
Thank you so much! You are helping so many people here!
@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
@isthatsansfromburgerking
@isthatsansfromburgerking 10 ай бұрын
can we just give this man A ROUND OF APPLAUSE for helping out all the struggling students
@TalkThisOut
@TalkThisOut 2 жыл бұрын
thank you for walking me down the logic and code, i got overwhelmed and had to look for help!
@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!
@Mxh_008
@Mxh_008 Ай бұрын
thank you so much for these vids, so helpful and explained thoroughly.
@ali-xperia71
@ali-xperia71 4 ай бұрын
WOW, you are a legend! keep up the good work!
@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 =)
@ravenheart369
@ravenheart369 Жыл бұрын
okay there you go 1 subscriber for you the material is absolutely beyond word keep doing this great content thank you
@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
@kubataiupov1245
@kubataiupov1245 Жыл бұрын
Thanks man. I solved it , before I wacthed this video and your explanations are awesome!
@mohamedfares1
@mohamedfares1 4 ай бұрын
You are the BEST!!
@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!
@Music-Books
@Music-Books Жыл бұрын
I love this explanation. This is clear and concise.
@Andoi117
@Andoi117 Жыл бұрын
Bro thank you for existing! I'm always 1 easy step away but cant figure it out. You help so much!
@beatrizsobczynski8556
@beatrizsobczynski8556 Жыл бұрын
Hey Rahul, you are the best! Thank you very much
@mehmetyigit7787
@mehmetyigit7787 11 ай бұрын
bro it makes sense now. I did more simply. I divided input to each number. It was acceptable anyway but I like yours more
@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!!! ;)
@dustinlee8977
@dustinlee8977 Жыл бұрын
Always detailed in why you are doing what you are doing. Coming from a beginner, thank you for the clarification.
@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.
@YomaHosamKhadam
@YomaHosamKhadam Жыл бұрын
Bro! You're amazing, please keep up with your work and upload more videos. Thank you so much, you're a lifesaver.
@jacobreed2709
@jacobreed2709 2 жыл бұрын
Thank you for making the 2022 update! Great walkthrough
@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 Жыл бұрын
@@okcgaming6543 what would the code be like for dimes? A hint please
@okcgaming6543
@okcgaming6543 Жыл бұрын
@@qiqi4830 dimes are 10 cents while quarters are 25, u got this
@cawai2815
@cawai2815 2 жыл бұрын
Thank God you exist!
@SP_PLAYS_YT
@SP_PLAYS_YT 2 жыл бұрын
i've been stuck in this problem for days man, Thank you soo much!!!!
@Liam-10
@Liam-10 Жыл бұрын
Please keep sharing these problem solutions 🙏🙏🙏❤️❤️❣️
@enchantedbeauty875
@enchantedbeauty875 2 жыл бұрын
Thank you sooo much was struggling so much!! this really helped!
@epic8498
@epic8498 Жыл бұрын
you are the best man, keep us going
@omaralzaidi5458
@omaralzaidi5458 Жыл бұрын
thank you bro from my heart.
@elinamdoraashley882
@elinamdoraashley882 Жыл бұрын
Good thank you very much...😊
@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
@kyland719
@kyland719 Жыл бұрын
Thanks bro, this really helped clear up what exactly the functions are doing
@chefjonsf
@chefjonsf 2 жыл бұрын
Thank you for the thought process in approaching these problems. I honestly don't know where I would begin.
@s.x.mu123
@s.x.mu123 Жыл бұрын
gracias por tu video amor me salvaste mucho tiempo
@KiraCuraMusic
@KiraCuraMusic Жыл бұрын
I hope you keep making more videos! :)
@chidebrutechs
@chidebrutechs 2 жыл бұрын
You made jump over the hump, great explanation. Thanks
@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
@Bobote809
@Bobote809 2 жыл бұрын
thank you so much man really!! from the whole community..
@shambhvilokre
@shambhvilokre Жыл бұрын
THANKYOU SO MUCH
@eq104eerly9
@eq104eerly9 Жыл бұрын
you are the best
@el-sayedel-senosy1749
@el-sayedel-senosy1749 Жыл бұрын
thx bro the definition of the real teacher should be u!!!
@kianaahmadi1198
@kianaahmadi1198 2 жыл бұрын
You made it easy! Thank you ,please keep going
@Luiz_Aquino
@Luiz_Aquino Жыл бұрын
Thank you my brother
@juanGuzman-pl2xu
@juanGuzman-pl2xu 2 жыл бұрын
Thank you for posting the new peoblems! You are amazing hope everything goes great for you my friend!
@RealJapanHD
@RealJapanHD 10 ай бұрын
Great video! Have you uploaded a step-by-step guide for solving the credit problem?
@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.
@sjxy-gq9sb
@sjxy-gq9sb 2 жыл бұрын
Works well!! DANKEEE
@andreviniciusbezerradasilv9335
@andreviniciusbezerradasilv9335 2 жыл бұрын
thank you brother
@Azron2190
@Azron2190 Жыл бұрын
Thank you so much. Completely new to all of this and you just explain things so well!
@roelofwillems
@roelofwillems Жыл бұрын
You are a rockstar!
@FloydianDip
@FloydianDip 2 жыл бұрын
You're a genuis guy. You made it so easy and very logical. God Bless!
@NicholasJamesWinfrey
@NicholasJamesWinfrey 2 жыл бұрын
This video was great. You should really make more of them.
@lut1748
@lut1748 6 ай бұрын
tysm this helped a lot
@YuliAShares
@YuliAShares Жыл бұрын
thank you so much
@maxim5519
@maxim5519 Жыл бұрын
Thanks for great explanation of the task. I'm able to do code myself, but can`t catch task idea.
@barry0719
@barry0719 2 жыл бұрын
thank you very much for the help
@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!
@Grtishere
@Grtishere Жыл бұрын
tysm
@zixinzhang4296
@zixinzhang4296 Жыл бұрын
Very well explained! 😇
@AdonayFloresLaMota
@AdonayFloresLaMota 2 жыл бұрын
Thank you for the explanation!
@reinaldo7231
@reinaldo7231 Жыл бұрын
tks man
@abdallaalhaedre2287
@abdallaalhaedre2287 2 жыл бұрын
thanks man you really made it so easy
@نوافالدوسري-ن7ن
@نوافالدوسري-ن7ن Жыл бұрын
Thanks❤
@ChristopherCalderonChrisCalder
@ChristopherCalderonChrisCalder 10 ай бұрын
I like your bed sheets.
@lexluthor8
@lexluthor8 2 жыл бұрын
Thanks
@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.
@codeandtech77
@codeandtech77 3 ай бұрын
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
@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.
@abdirahman55
@abdirahman55 2 жыл бұрын
really thank you
@linuxka
@linuxka 2 жыл бұрын
You’re really awesome man! Thank you 😊
@Mai_Tai_Meyers
@Mai_Tai_Meyers 2 жыл бұрын
appreciate the help!
@RoylCJ
@RoylCJ Жыл бұрын
You are a saint
@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!
@DevoutJourney
@DevoutJourney 2 жыл бұрын
Thank you so much!
@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.
@Ahmed-jl7uh
@Ahmed-jl7uh 2 жыл бұрын
Thanks, video came just in time :)
@juanelointriago
@juanelointriago 2 жыл бұрын
Thanks for the help. You are amazing !
@alitm7333
@alitm7333 2 жыл бұрын
you really help me to imporve my skill and knowledge ! thank you so much
@الطيبعثمان-ظ6ف
@الطيبعثمان-ظ6ف 2 жыл бұрын
thanks a small word for your work 🔥
@dianazaguralska2796
@dianazaguralska2796 Жыл бұрын
Thank you!!
@toshinova1826
@toshinova1826 2 жыл бұрын
mans is amazing
@BlackCat-lz5tr
@BlackCat-lz5tr 7 ай бұрын
You could devide by the value of the coin in the function for instinct you can devide quarter to cents / 25
@sub.owen.create
@sub.owen.create 2 жыл бұрын
Great explanation as always, many thanks
@iamwatari4088
@iamwatari4088 10 ай бұрын
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.
@rajatsharma6509
@rajatsharma6509 2 жыл бұрын
thank you bro op
@Blueprint4Murder
@Blueprint4Murder 9 ай бұрын
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?
@enriqueavila8669
@enriqueavila8669 8 ай бұрын
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
CS50 Problem Set 1 - Mario Walkthrough (Step by Step for Beginners)
18:23
CS50 Made Easy with Rahul
Рет қаралды 241 М.
CS50 Problem Set 2 - Caesar (Step by Step Walkthrough for Beginners)
25:50
CS50 Made Easy with Rahul
Рет қаралды 80 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 64 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 3,2 МЛН
(CS50) CREDIT - PROBLEM SET 1 | SOLUTION
37:16
Dors Coding School
Рет қаралды 35 М.
CS50 MARIO LESS - PROBLEM SET 1 | SOLUTION
22:06
Dors Coding School
Рет қаралды 9 М.
CS50 Problem Set 1 - Cash Walkthrough (Step by Step for Beginners)
10:10
CS50 Made Easy with Rahul
Рет қаралды 54 М.
Teaching Academic Honesty in CS50 - SIGCSE 2020
19:23
CS50
Рет қаралды 93 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 850 М.
(CS50) MARIO MORE - PROBLEM SET 1 | SOLUTION
23:20
Dors Coding School
Рет қаралды 5 М.
Why You SHOULD NOT Take Harvard CS50 in 2024
8:01
CS50 Made Easy with Rahul
Рет қаралды 302 М.
CS50 PSET1 Hello, Mario More, Mario Less, Cash, Credit Solutions
1:05:43
Algorithms Illustrator
Рет қаралды 59 М.