Search Header Logo

EXAMEN NOVENO BUCLES

Authored by SEBASTIAN CASTRO

Others

9th - 12th Grade

Used 2+ times

EXAMEN NOVENO BUCLES
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

  1. Pide 6 notas (0–5) y cuenta cuántas son ≥ 3.0.

let aprobados = 0;

for (let i = 1; i <= 6; i++) {

let n = parseFloat(prompt("Nota " + i + ":"));

if (n >= 3) { (a)   ; }

}

alert("Aprobados: " + aprobados);

2.

FILL IN THE BLANKS QUESTION

1 min • 1 pt

  1. Lee ventas hasta ingresar 0. Cuenta cuántas superan 200000.

let c = 0;

let v = parseFloat(prompt("Venta (0 para terminar):"));

while (v !== 0) {

if (v > 200000) { c++; }

v = (a)   (prompt("Venta (0 para terminar):"));

}

alert("Destacadas: " + c);

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Para sumar solo valores positivos de 10 entradas:

  1. if (v >= 0) total += v;

  1. if (v > 0) total += v;

  1. if (v >= 0) total = v;

  1. if (v >= 10) total = v;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Un cine quiere calcular cuántas entradas con descuento se venden en un día. El descuento aplica solo a clientes menores de 12 años o mayores de 60. El programa debe recibir la edad de cada cliente (5 en total) y contar cuántos obtienen descuento. ¿Qué condición usarías dentro del bucle for?

if (edad <= 12 || edad >= 60)

if (edad < 12 && edad > 60)

if (edad < 12 || edad > 60)

if (edad >= 12 && edad <= 60)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Una tienda procesa las compras de 8 clientes y quiere saber el total vendido. Solo sumará compras de más de $50.000. ¿Qué instrucción es correcta dentro de un while?

if (compra >= 50000) { total += compra; }

if (compra > 50000) { total = compra; }

if (compra >= 50000) { total =+ compra; }

if (compra > 50000) { total += compra; }

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Un colegio realiza un bucle do while para registrar calificaciones. Si una nota es menor a 3.0, se considera reprobada y se cuenta. ¿Qué variable debería aumentar en el if?

A) contador_aprobados++

contador_aprobados++

contador_reprobados++

nota++

total_notas++

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál es el resultado de este código?

for (let i = 1; i <= 3; i++) {

if (i % 2 === 0) {

console.log(i * 2);

}

}

2, 4, 6

4

2, 6

4, 6

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?