#can someone explain this to me in idiot terms as a beginner

1 messages · Page 1 of 1 (latest)

sonic vapor
#

i dont understand what everything means

#

and i dont understand this\

frank plankBOT
#

studio** You are now Level 1! **studio

hard kindle
#

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

toxic bear
# sonic vapor and i dont understand this\

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

sonic vapor
#

holy shit i understand

#

this took me too long to understand