I have issues with reasoning / logic; how to find solution to a problem with due steps from the beginning. Any help? | Sololearn: Learn to code for FREE!

0

I have issues with reasoning / logic; how to find solution to a problem with due steps from the beginning. Any help?

1/25/2022 8:28:54 PM

𝑨𝒍𝒗𝒊𝒏

2 Answers

New Answer

+7

Write out the steps in English (or your mother tongue). Then convert each step into a line of code. If a step can't be accomplish in a single line of code, simplify what you have written so it can be.

+2

You could try starting with the whole problem then breaking it down into smaller sections then breaking those sections down even further until it's easy to see what needs to be done. Sometimes that works better than trying to start from the smaller details. For example, in a pacman-style game, you've got the player's character, the enemies and the level layout. Then you can break the player's character down further into coding which buttons move which directions, what happens when an enemy touches them etc.