320 likes | 498 Views
5.05 Applying Looping Structures. Computer Programming 1. What prompts you for input?. Message box Input box Label None of the above. Input Box. The most common counter variable is:. A X N I. I. Used for keeping a running total:. Accumulator Counter Input box None of the above.
E N D
5.05 Applying Looping Structures Computer Programming 1
What prompts you for input? • Message box • Input box • Label • None of the above • InputBox
The most common counter variable is: • A • X • N • I • I
Used for keeping a running total: • Accumulator • Counter • Input box • None of the above • Accumulator
Used to test the condition before the loop: Post-test Pre-test Test All of the above Pre-test
Which one is a pretest loop? • Do loop while • Do While • A and B • For Next • Do While
This loop is executed until the counter is reached • Do loop While • For next • Do While • All of the above • For next
A counter is a _____________. • Integer • Boolean expression • String • A and B • Integer
A condition used to signify that a loop should stop: • Breakpoint • Flag • Variable • Posttest • Flag
What happens when the programmer forgets to increment a counter variable? • Do While Loop • Flag • Infinite loop • None of the above • Infinite loop
Use the ______________loop when you know how many times the loop will run. • Do While • For next • Do loop while • Counter • For next
The For…Next loop is used when: • You know how many times the loop will run • When a variable is used in the condition • All of the above • None of the above • You know how many times the loop will run
True or FalseThe step integer can be a negative number to tell the compiler to decrement the counter • True
Each time the loop runs is called a/an: • Iteration • Accumulator • Counter • Iteration • Running total
If, in a pretest, the condition is false the loop will terminate? • False
In the syntax code, the condition must always be a: • Boolean expression • Loop structure • Post test • Boolean expression • Pretest
The Do…Loop structure evaluates a condition ______ executing a loop once: • Before • After • Neither • After
True or False: A loop is endless when it is always true? • True
The looping structure that evaluates a condition after executing a loop once is the: • For…Next loop • Do While…Loop • Do…Loop While • For…Each Next • Do…Loop While
What is a dialog box that pops up and prompts the user for input? • Input Box
What is the counter variable used to determine? • The number of times a loop executes
How does the accumulator variable differ from a counter? • The value that updates the accumulator changes
What is it called when programmers can code repeated actions into their programs? • Loop
Use a _____ when you know how many times the loop will run • For…Next
Use a _____ when a variable is used in the condition: • While loop or Do…While Loop
A logic error known as the ________ occurs when the programmer forgets to increment the counter variable: • Endless or infinite loop
When the loop does the loop once and THEN checks the condition: • Pre-test • Post-test • Pre-Run • Post-Run • Post-test
Used to run repeated actions: • Counter • Accumulator • Adder • Total Loop • Accumulator
The code for an Accumulator is: • Accumulator =Accumulator + Value • Accumulator += Accumulator • Both A and B • Neither A nor B • Both A and B
A logic error where the loop executes indefinitely: • Never-Ending loop • Indefinite loop • Endless Loop • NerdRage Loop • Endless Loop
Tests the condition before it executes: • Pre-test loop • Post-test loop • Do…Loop • Some other Loop we have not learned • Pre-test loop