any advice on how to get better at knowing how to read a loop statement | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

any advice on how to get better at knowing how to read a loop statement

everytime I write a program that involves a loop statement the program gives a wrong output I'll have to change it multiple times before it can output a correct answer ,. Is there anyway I can get better at using loop statements correctly ??

10th Mar 2021, 2:26 PM
Bãrt Simpson
Bãrt Simpson - avatar
2 Réponses
+ 3
These things - loops, conditions and such - are the technical core of each language. So you'll necessarily write and rewrite countless lines of that sort of code. Which means you'll get a lot of practice at getting it right. Which is really the only way to get better at these things - practice, lots of practice.
10th Mar 2021, 5:03 PM
HonFu
HonFu - avatar
+ 4
Better way is to know "what went wrong in code to get right answer in loop". So understand code and find whats wrong there and what changes needed there.. so next time you can do it right way easily.. Make question about that and Post that code which is giving you wrong answer here, if you not find solution.. so that community help you to understand it better with correct solution...
10th Mar 2021, 3:48 PM
Jayakrishna 🇮🇳