¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Chapter 5 (Repetition Structures)

Usuario eliminado El usuario ha eliminado su información de asignaturas Inglés 33 fichas

Fichas del conjunto (33)

  1. 1A _____-controlled loop uses a true/false condition to control the number of times that it repeats.Condition
  2. 2A _____-controlled loop repeats a specific number of times.Count
  3. 3Each repetition of a loop is known as an _____.Iteration
  4. 4The "While" loop is a _____ type of loop.Pretest
  5. 5The "Do-While" loop is a _____ type of loop.Posttest
  6. 6The "For" loop is a _____ type of loop.Pretest
  7. 7An _____ loop has no way of ending and repeats until the program is interrupted.Infinite
  8. 8A _____ loop always executes at least once.Posttest
  9. 9A _____ is a special value that signals when there are no more items from a list of items to be processed. This value cannot be mistaken as an item from the list.Sentinel
  10. 10A _____ causes a statement or set of statements to execute repeatedly.Repetition Structure (Loop)
  11. 11Both "_____" and "_____" lops cause a statement or set of statements to repeat as long as a condition is true.While / Do-While
  12. 12The "_____" loop causes a statement or set of statements to repeat until a condition is true.Do-Until
  13. 13True/False: Modules can be called from statements in the body of a loop. This actually often improves the code's design.True
  14. 14A _____ loop means that it tests its condition before performing an iteration.Pretest
  15. 15What is the difference between a "Do-While" loop and a "Do-Until" loop?A "Do-While" loop iterates while a condition is true. When the condition is false, the "Do-While" loop stops. A "Do-Until" loop iterates until a condition is true. When the condition is true, the "Do-Until" loop stops.
  16. 16A _____ stores the number of iterations that it has performed within a count-controlled loop.Counter Variable (Counter)
  17. 17Using the counter variable, the loop typically performs the following three actions:Initialization, Test, and Increment
  18. 18To _____ a variable means to increase its value.Increment
  19. 19The count-controlled loop _____ the counter variable by comparing it to a maximum value. If the counter variable is less than or equal to the maximum value, the loop iterates. If the counter is greater than the maximum value, the program exits the loop.Tests
  20. 20Before the count-controlled loop begins, the counter variable is _____ to a starting value. The starting value that is used will depend on the situation.Initialized
  21. 21The amount by which the counter variable is incremented in a "For" loop is known as the _____.Step Amount
  22. 22True/False: Most programming languages provide a way to change the step amount. This gives you the ability to increment the counter variable by any value you wish.True
  23. 23To _____ a variable means to decrease its value.Decrement
  24. 24True/False: In most situations, it's best to use the "For" statement to write a count-controlled loop.True: You can use a count-controlled "While" loop, but a "For" loop is better.
  25. 25True/False: If you forget to increment the counter variable in a count-controlled "While" loop, the loop will iterate an infinite number of times.True
  26. 26A _____ is a sum of numbers that accumulates with each iteration of a loop. The variable used to keep it is called an _____.Running Total / Accumulator
  27. 27What two key elements are used in programs to calculate the total of a series of numbers?A loop that reads each number in the series. / A variable that accumulates the total of the numbers as they are read.
  28. 28Should an accumulator be initialized to any specific value? Why or why not?Yes, it should be initialized with the value 0. This is because values are added to the accumulator by a loop. If the accumulator doesn't start at the value 0, it will not contain the correct total of the numbers that were added to it when the loop ends.
  29. 29Why should you take care to choose a unique value as a sentinel?A sentinel value must be unique enough that it will not be mistaken as a regular value in the list.
  30. 30A _____ is a loop that is inside another loop.Nested Loop
  31. 31True/False: In a nested loop, an inner loop goes through all of its iterations for every single iteration of an outer loop.True
  32. 32True/False: In a nested loop, inner loops complete their iterations slower than outer loops.False: Inner loops complete their iterations faster than outer loops.
  33. 33True/False: In a nested loop, to get the total number of iterations of a nested loop, multiply the number of iterations of all loops.True

Información

Descripción
El usuario ha eliminado su información de asignaturas Fichas sobre Chapter 5 (Repetition Structures), creado por Usuario eliminado el 12/01/2021.
Creado por
Usuario eliminado · ene 2021
Actualizado
12 ene 2021
Visitas
15
Historial
  • Creado por Andrew Lewis · 13 dic 2020
  • Copiado por Andrew Lewis · 12 ene 2021
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?