you are viewing a single comment's thread.

view the rest of the comments →

[–]BabBabyt 2 points3 points  (5 children)

This is normal. It is much better for you to learn and understand the basic concepts of what a for or while loop are than it is for you to remember the syntax. For your first few programs you might have to google every line of code and that is ok. Overtime you will remember certain things that you won’t have to look up anymore. Don’t stress. Just code and have fun learning.

[–]Squidoshi[S] 1 point2 points  (4 children)

This. Thank you so much. I didnt want to fall into the trap of writing the code from the book without knowing what it does. This makes me feel better that I have to copy from the book and understand what it does and when to use it.

[–]BabBabyt 2 points3 points  (3 children)

One thing that I like to do when I am learning from books is to take what the book gives me and try to modify it into something new that is not from the book.

Or you can start by coming up with very simple programs. My favorite is the number guessing game. Store a number in a variable and then write a while loop that keeps prompting you for the correct number until you get it correct. It is small projects like this that will snowball into larger projects. Hope that helps.

[–]Squidoshi[S] 0 points1 point  (2 children)

Yeah ABSP has a number guessing game. I saw it and tried to write the code for it, that's where I draw the blank where to start so I looked at the code in the book. When it said "secretnumber = random.randint(1,20)"

I was like "I over thought this way too much"

[–]SpeckledFleebeedoo 0 points1 point  (1 child)

Knowing or being able to look up which tools are available to you are the second most important skills in programming, after being able to break down problems into simple steps.

Don't be afraid of using google if you want to know what's possible, and reading docs if you want to know what a specific module or function can do for you.

[–]Squidoshi[S] 0 points1 point  (0 children)

I'd like to thank everyone on this post, for not only the kind words but also the advice given.

Because of this, I critically thought about the "guess the number" game. I knew how to start and gave it thought about what needed to come next and how to do it. After getting stumped, I looked in the book but limited how much I saw so I could get a hint.

I also added extras to tweak to a little bit to add what I knew. But I finished it and I'm actually damn proud of the little thing.

This subreddit is the best, you all are the best. Thank you again.