14
Spent $40 on a Python course and it finally made functions click for me.
I was stuck for weeks until the instructor showed a real example of using a function to calculate a restaurant tip, which made me see how to break my own code into reusable pieces.
3 comments
Log in to join the discussion
Log In3 Comments
the_finley23d agoMost Upvoted
Oh man, that's awesome! I swear I spent way too long just writing the same lines over and over before functions made sense. My early code looked like a copy-paste nightmare, lmao. That tip example sounds perfect for getting it. Congrats on the breakthrough, that's a huge step.
4
the_jade23d ago
That's a solid way to get it. The real win is when you start seeing places to use them in your own old code.
1
gavin_moore19d ago
Yeah, that's the real turning point. @the_jade nailed it about seeing it in your own old code. How long did it take you to get to that "oh, I should make a function for this" moment, and what was the first messy bit of code you cleaned up?
2