Intentos permitidos 2
Instrucciones
https://poli.instructure.com/courses/11280/quizzes/41088 1/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Historial de intentos
https://poli.instructure.com/courses/11280/quizzes/41088 2/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
boolean a = false;
boolean b = true;
boolean c = !a;
boolean d = a || b;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
https://poli.instructure.com/courses/11280/quizzes/41088 3/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (e);
System.out.println (f);
true
true
true
true
true
false
true
true
true
true
true
true
false
true
true
true
true
true
Correcto!
false
true
true
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 4/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Pregunta 2
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
System.out.println (i);
Error de compilación
https://poli.instructure.com/courses/11280/quizzes/41088 5/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
20
19
18
17
16
15
14
13
12
11
10
Correcto! 10
9
8
7
6
5
4
3
2
1
0
1.0
9.0
1.0
2
3
-1
Pregunta 3
3.75 / 3.75 ptos.
https://poli.instructure.com/courses/11280/quizzes/41088 6/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
String u = i + "" + n + j + "!";
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
e
e
d+e
de!
de
d
e
de
de
d2!
Correcto!
d
e
d+e
de
d2e!
d
e
de
de
de!
https://poli.instructure.com/courses/11280/quizzes/41088 7/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Pregunta 4
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
int i = 1, j = 2, k = 0;
3.0
11.0
1.0
2
3
-2
https://poli.instructure.com/courses/11280/quizzes/41088 8/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Correcto!
0.0
9.0
3.0
2
9
-1
1.0
29.8
9.933333333333334
4
11
1.0
9.0
1.0
2
3
-1
Pregunta 5
3.75 / 3.75 ptos.
Correcto!
4
https://poli.instructure.com/courses/11280/quizzes/41088 9/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Pregunta 6
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
int x=26750,r=0;
r+=x/10000;
x=x%10000;
r+=x/1000;
x=x%1000;
r+=x/100;
x=x%100;
r+=x/10;
r+=x%10;
System.out.println(x);
90
https://poli.instructure.com/courses/11280/quizzes/41088 10/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
180
Correcto!
50
130
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
int x=26750,r=0;
r+=x/10000;
x=x%10000;
r+=x/1000;
x=x%1000;
/*
r+=x/100;
x=x%100;
*/
r+=x/10;
https://poli.instructure.com/courses/11280/quizzes/41088 11/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
r+=x%10;
System.out.println(r);
Correcto!
83 (83..83)
33
23
Pregunta 8
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
int n=2;
if (i>j){
System.out.print (j+2);
https://poli.instructure.com/courses/11280/quizzes/41088 12/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
System.out.println();
Correcto! 1
232
4
444
4
232
1
222
Pregunta 9
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
https://poli.instructure.com/courses/11280/quizzes/41088 13/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
int a = 1;
int b = 2;
int c = 5;
int d = (a + b) * c;
int e = a + b * c;
int f = 2 * a * a * + b * 3 + c;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
Correcto!
1
2
5
15
11
17
1
2
5
15
12
17
https://poli.instructure.com/courses/11280/quizzes/41088 14/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
2
3
6
15
11
17
1
3
5
15
10
17
Pregunta 10
0 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
int n=5;
int m = n * 2;
int i = 1;
while (i <= n) {
https://poli.instructure.com/courses/11280/quizzes/41088 15/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
int j = 1;
while (j < m) {
if (j <= n)
else
} else {
j = j + 1;
System.out.println ();
i = i + 1;
123451
1234
12
Respuesta correcta 1 2 3 4 5 4 3 2 1
1234321
12321
121
1
Respondido 1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
https://poli.instructure.com/courses/11280/quizzes/41088 16/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
Pregunta 11
3.75 / 3.75 ptos.
Correcto!
True
False
Pregunta 12
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
https://poli.instructure.com/courses/11280/quizzes/41088 17/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
int a = 1;
int b = 2;
int c = 5;
int d = (a + b) * c;
int e = a + b * c;
int f = 2 * a * a * + b * 3 + c;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
1
2
5
15
12
17
Correcto!
1
2
5
15
11
17
1
3
5
15
10
17
https://poli.instructure.com/courses/11280/quizzes/41088 18/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
2
3
6
15
11
17
String a = "hola";
String b = 'h' + "o" + 'l' + "a" + "";
boolean c = a.equals (b);
boolean e = !c;
char f = 'f';
char g = 'f';
boolean h = g != f;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (e);
System.out.println (f);
System.out.println (g);
System.out.println (h );
Correcto!
hola
hola
true
false
f
f
false
https://poli.instructure.com/courses/11280/quizzes/41088 19/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
hola
hola_
false
true
g
f
false
hola
hola
false
false
f
g
false
hola_
hola
false
false
g
g
false
Pregunta 14
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
https://poli.instructure.com/courses/11280/quizzes/41088 20/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
boolean a = false;
boolean b = true;
boolean c = !a;
boolean d = a || b;
boolean e = d || c && !a;
boolean f = true && !e;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
Correcto!
false
true
true
true
true
false
false
true
true
true
false
false
false
true
true
true
true
true
https://poli.instructure.com/courses/11280/quizzes/41088 21/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
false
true
false
true
true
false
Pregunta 15
3.75 / 3.75 ptos.
Multiplicación
Correcto!
Módulo
División
Resta
Pregunta 16
0 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
https://poli.instructure.com/courses/11280/quizzes/41088 22/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
int n=2;
Respuesta correcta
2*1=2
2*2=4
2*3=6
2*4=8
2 * 5 = 10
2 * 6 = 12
2 * 7 = 14
2 * 8 = 16
2 * 9 = 18
2 * 10 = 20
https://poli.instructure.com/courses/11280/quizzes/41088 23/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Respondido
1*1=1
2*2=4
3*3=9
4 * 4 = 16
5 * 5 = 25
6 * 6 = 36
7 * 7 = 49
8 * 8 = 64
9 * 9 = 81
10 * 10 = 100
6*1=6
6 * 2 = 12
6 * 3 = 18
6 * 4 = 24
6 * 5 = 30
6 * 6 = 36
6 * 7 = 42
6 * 8 = 48
6 * 9 = 54
6 * 10 = 60
https://poli.instructure.com/courses/11280/quizzes/41088 24/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
4*1=4
4*2=8
4 * 3 = 12
4 * 4 = 16
4 * 5 = 20
4 * 6 = 24
4 * 7 = 28
4 * 8 = 32
4 * 9 = 36
4 * 10 = 40
1*1=1
1*2=2
1*3=3
1*4=4
1*5=5
1*6=6
1*7=7
1*8=8
1*9=9
1 * 10 = 10
https://poli.instructure.com/courses/11280/quizzes/41088 25/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
Suponga la siguiente porción de código donde existe una variable numero definida
int resultado = 0;
if (numero % 2 == 0) {
if (numero % 4 == 0) {
if (numero % 6 == 0)
resultado = 3;
else
resultado = 2;
}
else {
resultado = 1;
}
}
else {
resultado = 0;
}
https://poli.instructure.com/courses/11280/quizzes/41088 26/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Pregunta 18
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
String a = "hola";
String b = 'h' + "o" + 'l' + "a" + "";
boolean c = a.equals (b);
boolean e = !c;
https://poli.instructure.com/courses/11280/quizzes/41088 27/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
char f = 'f';
char g = 'f';
boolean h = g != f;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (e);
System.out.println (f);
System.out.println (g);
System.out.println (h );
hola
hola_
false
true
g
f
false
hola_
hola
false
false
g
g
false
hola
hola
false
false
f
g
false
https://poli.instructure.com/courses/11280/quizzes/41088 28/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Correcto!
hola
hola
true
false
f
f
false
Pregunta 19
3.75 / 3.75 ptos.
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
4. Realize el encabezado public static void main (String[]
args){
5. Declare variables ( DE SER NECESARIO)
a = a + b;
b = a - b;
a = a - b;
a = 32 , b = 15
a = 15 , b = 15
https://poli.instructure.com/courses/11280/quizzes/41088 29/30
22/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
a = 32 , b = 17
Correcto!
a = 17 , b = 32
a = 49 , b = 32
nombre_variable = teclado.nextLine();
nombre_variable = teclado();
nombre_variable = teclado.nextDouble();
Correcto!
nombre_variable = teclado.nextInt();
https://poli.instructure.com/courses/11280/quizzes/41088 30/30