• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 4 páginas
Resumen

Summary Programming Logic and Design Ch 5

Document preview thumbnail
Vista previa 1 fuera de 4 páginas

This document provides an in depth and thorough summary of chapter 5 of Programming Logic and Design. It is ready for exam and tests. Everything is laid out as it is in the textbook. All needed information is provided in short. It is written in an easy to study format and reads easy. I got distinctions in exams and tests.

Vista previa del contenido

Chapter 5
Create loop logic
 Advantages of looping
 Makes programming efficient
 Write one set of instructions to operate multiple, separate sets of data
 Less time required for designing and coding, less errors, shorter compile time
 Loop: structure that repeats actions while some condition remains true

Use a loop control variable
 Loop control variable: variable that determines whether loop execution will continue
 As long as a condition remains true, the statement in a while loop's body will continue
executing
 Control number of repetitions (3 important steps for functionality)
 Loop control variable initialized before entering loop
 Loop control variable tested
 Variable is altered in body of loop so the tested condition that starts the loop will
eventually be false
 Repetitions controlled by:
 Counter - used to create a definite counter-controlled loop
 Sentinel value - used to create indefinite loop (user determines loop execution)

 Definite loop: executes a predetermined number of times
 Indefinite loop: performed different number of times each time, user decides how many
times
 Counter-controlled loop: Program counts repetitions
 Loop control variables altered by
 Incrementing ==> count = count + 1
 Decrementing ==> count = count - 1
 Can also add or subtract bigger values, like for every second number or year
 Counter: any numeric variable that counts the number of times an event has occurred,
usually starts with 0
 Why start counter with 0: arrays start counting at 0, application numbering start with 0,
contains number of times loop has executed which might be useful


Create nested loops
 Needed when values of two or more variables repeat to produce every combination of values
 Nested loops: loops within loops
 Outer loop: loop that contains the other loop
 Inner loop: the loop that is contained
 Each loop has its own control variable

Libro relacionado
 image
Editorial: 2023 ISBN: 9780357880876 Edición: Desconocido

Información del documento

¿Un libro?
No
¿Qué capítulos están resumidos?
5
Subido en
15 de noviembre de 2025
Número de páginas
4
Escrito en
2025/2026
Tipo
Resumen
$3.77

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
tanjanel1303
5.0
(2)
Vendido
11
Seguidores
2
Artículos
47
Última venta
1 mes hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes