1 / 32

5.05 Applying Looping Structures

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.

zariel
Télécharger la présentation

5.05 Applying Looping Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 5.05 Applying Looping Structures Computer Programming 1

  2. What prompts you for input? • Message box • Input box • Label • None of the above • InputBox

  3. The most common counter variable is: • A • X • N • I • I

  4. Used for keeping a running total: • Accumulator • Counter • Input box • None of the above • Accumulator

  5. Used to test the condition before the loop: Post-test Pre-test Test All of the above Pre-test

  6. Which one is a pretest loop? • Do loop while • Do While • A and B • For Next • Do While

  7. This loop is executed until the counter is reached • Do loop While • For next • Do While • All of the above • For next

  8. A counter is a _____________. • Integer • Boolean expression • String • A and B • Integer

  9. A condition used to signify that a loop should stop: • Breakpoint • Flag • Variable • Posttest • Flag

  10. What happens when the programmer forgets to increment a counter variable? • Do While Loop • Flag • Infinite loop • None of the above • Infinite loop

  11. Use the ______________loop when you know how many times the loop will run. • Do While • For next • Do loop while • Counter • For next

  12. 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

  13. True or FalseThe step integer can be a negative number to tell the compiler to decrement the counter • True

  14. Each time the loop runs is called a/an: • Iteration • Accumulator • Counter • Iteration • Running total

  15. If, in a pretest, the condition is false the loop will terminate? • False

  16. In the syntax code, the condition must always be a: • Boolean expression • Loop structure • Post test • Boolean expression • Pretest

  17. The Do…Loop structure evaluates a condition ______ executing a loop once: • Before • After • Neither • After

  18. True or False: A loop is endless when it is always true? • True

  19. 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

  20. What is a dialog box that pops up and prompts the user for input? • Input Box

  21. What is the counter variable used to determine? • The number of times a loop executes

  22. How does the accumulator variable differ from a counter? • The value that updates the accumulator changes

  23. What is it called when programmers can code repeated actions into their programs? • Loop

  24. Use a _____ when you know how many times the loop will run • For…Next

  25. Use a _____ when a variable is used in the condition: • While loop or Do…While Loop

  26. A logic error known as the ________ occurs when the programmer forgets to increment the counter variable: • Endless or infinite loop

  27. When the loop does the loop once and THEN checks the condition: • Pre-test • Post-test • Pre-Run • Post-Run • Post-test

  28. Used to run repeated actions: • Counter • Accumulator • Adder • Total Loop • Accumulator

  29. The code for an Accumulator is: • Accumulator =Accumulator + Value • Accumulator += Accumulator • Both A and B • Neither A nor B • Both A and B

  30. A logic error where the loop executes indefinitely: • Never-Ending loop • Indefinite loop • Endless Loop • NerdRage Loop • Endless Loop

  31. Tests the condition before it executes: • Pre-test loop • Post-test loop • Do…Loop • Some other Loop we have not learned • Pre-test loop

More Related