+ 1
I'm always facing issues to solve loop conditions like i take more time to compile the code on my mind..so is there any Shortcut
7 odpowiedzi
+ 1
Well you can only keep track of a handful of thoughts in short term memory so it can be easier to type or write out some pseudocode or plain language what you are trying to do as you work out the logic. Then you don't have to try as hard to remember.
I tend to always think in terms of if/else. Now for/while loops tend to come easier, but it's certainly a journey and repetition helps.
+ 3
@Joseph. Thanks. I had no idea what he meant
+ 2
wha.. pardon me. I do not understand what you have asked.
+ 1
Write it down in plain language or pseudocode.
+ 1
mr Joseph, does it really helps
+ 1
thanks Mr. Joseph for the productive reply. I certainly try to implement the new strategy..
+ 1
you can try to visualize the loop like a table, the variables that will be changed on one side and what it does for every value of the variable on the other side