Conditionals - need to know the condition o should be...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Conditionals - execute code when a Boolean expression is true Repetition: Loops in Alice - loops repeat statements or a block of statements o rather than repeating a method multiple times - counted loops/for loops o repeat a known number of times ie. Bunny hops 3 times - indefinite loops/while loops o repeat while a condition is true ie. Game hasn’t been won o can be a problem if condition is never false o while statement
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: need to know the condition o should be written so it will eventually end statements within loop must change conditions so condition will become false -nested loops o one loop in another -function in a for loop o can use a function to find out number of times loop should repeat -infinite for loops -indefinite repetition o don’t know how many times instructions should be repeated...
View Full Document

This note was uploaded on 02/28/2011 for the course CSCI 053 taught by Professor Sibert during the Fall '10 term at GWU.

Ask a homework question - tutors are online