alice-teacher Decrement in a for-loop

Don Slater don at alice.org
Tue Jan 30 14:43:57 EST 2018


Carlos,
I am having trouble seeing you image, but I suspect you have a variable that is keeping track of the decreasing value as you count up the appropriate amount… I do not know that there is an easier way to use the count loop for this purpose, and so it is at this point that I will introduce the while loop.

James has an interesting suggestion, well worth considering.

All the best,
Don Slater

Alice Project

	
> On Jan 30, 2018, at 10:08 AM, Carlos Bovell <cbovell at nburlington.com> wrote:
> 
> Hi,
> 
> Is there a way to count down in a for-loop? This is what we're doing but it seems awfully clumsy:
> 
> 
> 
> [cid:42806070-ba31-405a-9e42-bda03c3684da]
> 
> 
> Carlos Bovell
> Mathematics and Computer Science Dept
> Northern Burlington HS
> _______________________________________________
> alice-teachers mailing list
> alice-teachers at lists.andrew.cmu.edu
> To change settings or unsubscribe visit:
> https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers



More information about the alice-teachers mailing list