Alice3-Chapter12 Flashcards
A while statement evaluates a conditional expression and if the value is true, the instructions within the code block are performed.
T or F
True
If a while loop’s condition never becomes false, the cycle is unending and the while is said to be in an infinite loop.
T or F
True
While loop repetition occurs again and again until the condition becomes false.
T or F
True
When a while loop’s condition evaluates to false, execution flow exits the loop and skips to the next statement following the while code block.
T or F
True
A While control structure is similar to an if/else statement where a condition is checked before instructions may or may not be performed. However, an if/else statement executes just once and then the flow of execution continues on to the statement following the if/else code block. In a while loop, the flow of execution returns to the top of the while code block and the condition is checked again. If the condition is still true, the actions in the code block are performed again.
T or F
True
A while control is considered a _________ structure because it checks the value of a conditional expression.
Conditional
A _____________ is a procedure that helps another procedure carry out its task.
Helper procedure
A [a] must have at least one [b] statement. When a return statement is executed, control returns to the code statement that called the function. When [c] returns the value specified by the return statement is used in place of the function call.
Function
Return
Control
In Alice four built-in input functions are provided to prompt for a Boolean (true/false), String (text string), Double (decimal number), or Integer (whole number) value.
T or F
True
When an input function is called, the value entered by the user will be returned to the [a]. The returned value must immediately be used or, it may be stored in a [b] for use in a later statement.
Calling statement
Variable