Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Getting stuck with Python

Hello everyone,

I have finished the Python Basics section and I do not recall anything from it. I'm sure that I'm not the only one that can relate to this issue, but I just seem to always be clueless when it comes to moments where I have to start coding something out of thin air. Normally the instructors would tell you to pause the video and have you try it out, but I just let the video continue to go and I just copy from them.

Is there any way that I could better at remembering code better? Should I just go and restart the Basic course again for a refresher?

Yes, there is a better way. Stop copying any code. Write every example from scratch, use any local text editor you like - code, test, debug, repeat (including looking up commands and other solutions in the manual and general searches). If after a hundred scripts or so, it doesn't become easier then you start to worry and look for additional assistance.

Enjoy the thrill of getting it to work, spotting syntax errors and logic errors. Passive watching of videos will not work for most people.

Just my opinion :tropical_drink:

3 Answers

Hi George,

There have been plenty of times where I have had the same issue as well. We feel like we're doing a great job following along until we're asked to do something completely different.

What works for me is the following:

  1. Start making a list of those areas where you feel you need more practice.

    For example, "I feel comfortable with lists, but I'm having trouble with dictionaries." or "I feel like I understand methods, but I don't quite get constructors."

  2. Try looking for alternative tutorials on the topic that you're curious about.

    The Hitchhiker's Guide to Python, Real Python, Google's Python Class, and Goal Kicker are just a few of the great alternative resources available online.

  3. Practice writing out the code for the tutorials. It may not "click" just yet, but by typing out the code and following along, you'll begin to get used to patterns and trains of thought.

  4. I think that periodically reviewing Treehouse's Basic course is also a good idea, but make sure that you mix your sources. I often find that reading or hearing someone else's explanation of the same topic provides the best context for understanding things better.

Finally, if you want to take a different approach, try building something incredibly small. The process of creating a tiny application will open up many doors for your learning and teach you things that you may not have realized otherwise.

At the same time, I understand if you want to focus on following tutorials or if you don't have ideas. If that is the case, try going through the tutorial(s) a few more times, but try to reference it less as you get the hang of it. Keep notes about where you get stuck and the different solutions to problems you have.

Learning truly is a life-long journey. It may not be easy, but it is certainly worth it. Best of luck! :)

George, I can relate. This is my first programming language and I have been spending the past 2-3 days frustrated because I cannot seem to spit code out on the spot.

Especially when it comes to defined functions and while_loops.

I'm going to try all these opinions and apply them. Thanks!

Don't get frustrated. Nobody spits out code on the spot - it just seems that way.

It's similar to watching a professional musician - it looks like it came easy to them (and natural talent does play a part) but they put in the hours and played those same 12 notes many, many times.

Don't worry unless you written over 1000 loops and then don't understand.

Code, test, debug, repeat - one line at a time - pretty soon you have those programs dancing - Enjoy the journey

:palm_tree: :tropical_drink:

Thanks for the encouragement Dave! :)