#can someone explain this to me in idiot terms as a beginner
1 messages · Page 1 of 1 (latest)
** You are now Level 1! **
alright
i can explain this
myCounter in this context is a variable used to store an integer
in idiot terms, a number that goes up and down and is remembered by the computer for reference
im certain you know what print does though
the “for” and “do” is used to make the code run in a loop
first number is starting value, second is the amount the number (aka myCounter) that the loop will stop
You’re assigning the variable myCounter as 5, the end condition of the loop to be myCounter==1 and then for every iteration of the loop you decrement myCounter by 1
Increment just means to increase something by some value
Decrement is the opposite