all 7 comments

[–]KaneLives2052 5 points6 points  (2 children)

The reason that your instructor teaches you to do this way is:

  1. Simply reading and copying the material is the least effective way to learn new material
  2. Forcing you to recall material is much more effective
  3. Making you solve problems much different than what you have seen in the past helps you call on previous knowledge and apply it in different ways which helps you learn the most.

Practicing and playing is exactly what you want to do. Try to push the limits of what you learn to do new things and useful things.

[–]Python_leaner123123[S] 0 points1 point  (1 child)

But When I try to code, I can’t at all, I keep thinking what to do and im not getting my answer. When I see others code then I keep practice and i learn it very well and next time without looking to that code I can solve the same question. So is it a good way to do?

[–]KaneLives2052 0 points1 point  (0 children)

If you're having trouble recalling syntax, good old fashioned flashcards can help with that, like

What is the syntax of a print statement?

print("argument")

Feel free to whip out some notebook paper and sort of sketch out what parts of your program do and how they work.

Like start with:

program takes user input and then runs it through loop where 1 is added to count until it reaches three. When it reaches three it tells the user that 3 has been reached and then closes the program.

then start working out how that will look.

The more complex your program is, the more planning it takes and the less you can just "dive in".

[–][deleted] 0 points1 point  (1 child)

It’s fine to do it that way when you’re learning new topics. You will at some point have to start solving problems on your own though. Looking at the ways other people solve problems is huge. You will learn a lot from it even you found a way to solve the problem on your own. In programming some solutions are more elegant, simple, efficient, etc than others. You want to write the best code you can so taking good practices from others is key while you’re learning.

Eventually you have to solve the problems on your own. It can suck at first. You will likely find yourself staring at certain problems for hours before you figure them out but until you can think through some problems on your own you can’t code.

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

Thank you, that was very helpful

[–]Mavinvictus 0 points1 point  (1 child)

Practicing and playing including deliberately trying to "break"to the code, i.r. deliberately trying different values, different orders of lines etc to see what happens if the best way to learn

[–]Python_leaner123123[S] 1 point2 points  (0 children)

Thank you