Documente Academic
Documente Profesional
Documente Cultură
Instrucciones
https://poli.instructure.com/courses/11279/quizzes/41084 1/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Historial de intentos
https://poli.instructure.com/courses/11279/quizzes/41084 2/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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/11279/quizzes/41084 3/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/11279/quizzes/41084 4/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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)
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
de!
https://poli.instructure.com/courses/11279/quizzes/41084 5/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
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;
https://poli.instructure.com/courses/11279/quizzes/41084 6/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
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
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/11279/quizzes/41084 7/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
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
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/11279/quizzes/41084 8/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
3
5
15
10
17
1
2
5
15
12
17
https://poli.instructure.com/courses/11279/quizzes/41084 9/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2
3
6
15
11
17
¡Correcto!
4
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/11279/quizzes/41084 10/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int n=2;
if (i>j){
System.out.print (j+2);
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
System.out.println();
4
444
4
232
¡Correcto! 1
232
1
222
https://poli.instructure.com/courses/11279/quizzes/41084 11/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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) {
int j = 1;
while (j < m) {
if (j <= n)
else
} else {
j = j + 1;
System.out.println ();
i = i + 1;
https://poli.instructure.com/courses/11279/quizzes/41084 12/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto! 123454321
1234321
12321
121
1
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
123451
1234
12
1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
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 );
https://poli.instructure.com/courses/11279/quizzes/41084 13/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
hola
hola
true
false
f
f
false
hola
hola_
false
true
g
f
false
hola
hola
false
false
f
g
false
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 14/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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 );
hola
hola_
false
true
g
f
false
hola
hola
false
false
f
g
false
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 15/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
hola
hola
true
false
f
f
false
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;
https://poli.instructure.com/courses/11279/quizzes/41084 16/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1.0
9.0
1.0
2
3
-1
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
1.0
29.8
9.933333333333334
4
11
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/11279/quizzes/41084 17/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
a = a + b;
b = a - b;
a = a - b;
a = 49 , b = 32
a = 32 , b = 17
¡Correcto! a = 17 , b = 32
a = 15 , b = 15
a = 32 , b = 15
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);
https://poli.instructure.com/courses/11279/quizzes/41084 18/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2
3
6
15
11
17
¡Correcto!
1
2
5
15
11
17
1
3
5
15
10
17
1
2
5
15
12
17
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){
https://poli.instructure.com/courses/11279/quizzes/41084 19/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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);
System.out.println (e);
System.out.println (f);
true
true
true
true
true
true
https://poli.instructure.com/courses/11279/quizzes/41084 20/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
true
true
true
true
true
false
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
https://poli.instructure.com/courses/11279/quizzes/41084 21/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto! Double
Decimales
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=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/11279/quizzes/41084 22/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
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)
tp = 1 , tc = 3 ;
tp = 2 , tc = 2 ;
tp = 3 , tc = 3 ;
tp = 2 , tc = 1 .
https://poli.instructure.com/courses/11279/quizzes/41084 23/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
double de = 0.0;
if (tp == 1) {
de = 0.01;
}
else if (tp == 2) {
if (tc == 1)
de = 0.02;
else if (tc == 2)
de = 0.03;
else if (tc == 3)
de = 0.04;
} else {
de = 0.0;
}
System.out.println(de);
de = 0.01 para tp = 1 , tc = 3
de = 0.02 para tp = 2 , tc = 2
de = 0.02 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
de = 0.03 para tp = 1 , tc = 3
de = 0.01 para tp = 2 , tc = 2
de = 0.00 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
de = 0.01 para tp = 1 , tc = 3
de = 0.03 para tp = 2 , tc = 2
de = 0.02 para tp = 3 , tc = 3
de = 0.01 para tp = 2 , tc = 1
de = 0.01 para tp = 1 , tc = 3
de = 0.03 para tp = 2 , tc = 2
de = 0.02 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
https://poli.instructure.com/courses/11279/quizzes/41084 24/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
de = 0.02 para tp = 1 , tc = 3
de = 0.01 para tp = 2 , tc = 2
de = 0.03 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
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);
d
e
de
de
de!
e
e
d+e
de!
de
https://poli.instructure.com/courses/11279/quizzes/41084 25/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
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;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
https://poli.instructure.com/courses/11279/quizzes/41084 26/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
3.0
11.0
1.0
2
3
-2
1.0
9.0
1.0
2
3
-1
¡Correcto!
0.0
9.0
3.0
2
9
-1
2.0
9.0
1.0
3
9
-2
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){
https://poli.instructure.com/courses/11279/quizzes/41084 27/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int x=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/11279/quizzes/41084 28/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
¡Correcto!
Módulo
Resta
División
Multiplicación
Calificación de la evaluación: 75 de 75
https://poli.instructure.com/courses/11279/quizzes/41084 29/29
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Instrucciones
https://poli.instructure.com/courses/11279/quizzes/41084 1/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Historial de intentos
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 );
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 2/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
hola
hola
true
false
f
f
false
hola
hola
false
false
f
g
false
hola
hola_
false
true
g
f
false
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/11279/quizzes/41084 3/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int n=5;
int m = n * 2;
int i = 1;
while (i <= n) {
int j = 1;
while (j < m) {
if (j <= n)
else
} else {
j = j + 1;
System.out.println ();
i = i + 1;
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
123451
1234
12
https://poli.instructure.com/courses/11279/quizzes/41084 4/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto! 123454321
1234321
12321
121
1
1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
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;
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 );
https://poli.instructure.com/courses/11279/quizzes/41084 5/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
hola
hola_
false
true
g
f
false
hola_
hola
false
false
g
g
false
hola
hola
false
false
f
g
false
¡Correcto!
hola
hola
true
false
f
f
false
Ejercicio de Compilación:
1. Ingrese a eclipse.
https://poli.instructure.com/courses/11279/quizzes/41084 6/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11279/quizzes/41084 7/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
3.0
11.0
1.0
2
3
-2
2.0
9.0
1.0
3
9
-2
¡Correcto!
Evitar que al cumplirse un caso, se evalúen los demás casos de la
secuencia.
https://poli.instructure.com/courses/11279/quizzes/41084 8/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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;
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);
false
true
true
true
true
true
https://poli.instructure.com/courses/11279/quizzes/41084 9/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
false
true
false
true
true
false
¡Correcto!
false
true
true
true
true
false
false
true
true
true
false
false
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);
https://poli.instructure.com/courses/11279/quizzes/41084 10/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1.0
9.0
1.0
2
3
-1
20
19
18
17
16
15
14
13
12
11
10
¡Correcto! 10
9
8
7
6
5
4
3
2
1
0
Error de compilación
https://poli.instructure.com/courses/11279/quizzes/41084 11/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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);
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
System.out.println();
4
232
https://poli.instructure.com/courses/11279/quizzes/41084 12/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1
222
4
444
¡Correcto! 1
232
espuesta correcta 4
Respondido 6
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);
https://poli.instructure.com/courses/11279/quizzes/41084 13/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
1
3
5
15
10
17
2
3
6
15
11
17
Ejercicio de Compilación:
https://poli.instructure.com/courses/11279/quizzes/41084 14/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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)
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);
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
d
e
de
de
de!
https://poli.instructure.com/courses/11279/quizzes/41084 15/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
e
e
d+e
de!
de
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;
https://poli.instructure.com/courses/11279/quizzes/41084 16/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1.0
9.0
1.0
2
3
-1
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
1.0
29.8
9.933333333333334
4
11
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/11279/quizzes/41084 17/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
d
e
de
de
de!
https://poli.instructure.com/courses/11279/quizzes/41084 18/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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)
resultado=a * b;
200
¡Correcto! 308
30
109
500
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Math;
https://poli.instructure.com/courses/11279/quizzes/41084 19/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
import java.Scanner;
import java.util.Screen;
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;
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);
false
true
false
true
true
false
https://poli.instructure.com/courses/11279/quizzes/41084 20/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
false
true
true
true
true
false
false
true
true
true
false
false
false
true
true
true
true
true
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);
https://poli.instructure.com/courses/11279/quizzes/41084 21/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1
2
5
15
12
17
1
3
5
15
10
17
¡Correcto!
1
2
5
15
11
17
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';
https://poli.instructure.com/courses/11279/quizzes/41084 22/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
f
g
false
¡Correcto!
hola
hola
true
false
f
f
false
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 23/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
3.0
11.0
1.0
2
3
-2
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11279/quizzes/41084 24/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2.0
9.0
1.0
3
9
-2
¡Correcto!
0.0
9.0
3.0
2
9
-1
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/11279/quizzes/41084 25/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/11279/quizzes/41084 26/27
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/11279/quizzes/41084 27/27
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Instrucciones
https://poli.instructure.com/courses/11279/quizzes/41084 1/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Historial de intentos
https://poli.instructure.com/courses/11279/quizzes/41084 2/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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 r3=0;
int x=3;
float a=28.99f;
int b=6;
x=(int)a;
b--;
x=x % b * b % x - 6;
System.out.println(x);
¡Correcto! 9
-0.92135647
9 (9..9)
34
https://poli.instructure.com/courses/11279/quizzes/41084 3/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/11279/quizzes/41084 4/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
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/11279/quizzes/41084 5/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
false
f
g
false
hola
hola_
false
true
g
f
false
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 6/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
hola
hola
true
false
f
f
false
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);
}else{
if (i>=j){
System.out.print (i);
}else{
https://poli.instructure.com/courses/11279/quizzes/41084 7/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
System.out.print ("");
System.out.println();
Respondido 4
444
1
222
4
232
espuesta correcta 1
232
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);
https://poli.instructure.com/courses/11279/quizzes/41084 8/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
false
true
true
true
true
false
false
true
true
true
true
true
false
true
false
true
true
false
false
true
true
true
false
false
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){
https://poli.instructure.com/courses/11279/quizzes/41084 9/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int i = 1, j = 2, k = 0;
3.0
11.0
1.0
2
3
-2
1.0
9.0
1.0
2
3
-1
¡Correcto!
0.0
9.0
3.0
2
9
-1
https://poli.instructure.com/courses/11279/quizzes/41084 10/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1.0
29.8
9.933333333333334
4
11
¡Correcto!
System.out.println("Hola Mundo");
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
https://poli.instructure.com/courses/11279/quizzes/41084 11/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
2.0
9.0
1.0
3
9
-2
1.0
9.0
1.0
2
3
-1
Ejercicio de Compilación:
1. Ingrese a eclipse.
https://poli.instructure.com/courses/11279/quizzes/41084 12/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
previamente. Evalúe la ejecución con valores 3, 12, 18, 20, 22.
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/11279/quizzes/41084 13/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
División
¡Correcto! Módulo
Resta
Multiplicación
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/11279/quizzes/41084 14/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/11279/quizzes/41084 15/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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);
2
3
6
15
11
17
https://poli.instructure.com/courses/11279/quizzes/41084 16/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1
2
5
15
12
17
1
3
5
15
10
17
¡Correcto!
1
2
5
15
11
17
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;
https://poli.instructure.com/courses/11279/quizzes/41084 17/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
r+=x/1000;
x=x%1000;
r+=x/100;
x=x%100;
r+=x/10;
r+=x%10;
System.out.println(x);
90
130
¡Correcto! 50
180
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 a = 1;
int b = 2;
int c = 5;
int d = (a + b) * c;
int e = a + b * c;
https://poli.instructure.com/courses/11279/quizzes/41084 18/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
3
5
15
10
17
2
3
6
15
11
17
1
2
5
15
12
17
https://poli.instructure.com/courses/11279/quizzes/41084 19/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
espuesta correcta
Evitar que al cumplirse un caso, se evalúen los demás casos de la
secuencia.
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 );
https://poli.instructure.com/courses/11279/quizzes/41084 20/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
hola_
hola
false
false
g
g
false
hola
hola
false
false
f
g
false
hola
hola_
false
true
g
f
false
¡Correcto!
hola
hola
true
false
f
f
false
https://poli.instructure.com/courses/11279/quizzes/41084 21/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11279/quizzes/41084 22/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2.0
9.0
1.0
3
9
-2
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;
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
https://poli.instructure.com/courses/11279/quizzes/41084 23/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
false
true
true
true
true
true
false
true
false
true
true
false
false
true
true
true
false
false
False
¡Correcto! True
https://poli.instructure.com/courses/11279/quizzes/41084 24/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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)
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
de!
d
e
de
de
d2!
https://poli.instructure.com/courses/11279/quizzes/41084 25/26
9/21/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
d
e
d+e
de
d2e!
https://poli.instructure.com/courses/11279/quizzes/41084 26/26
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Instrucciones
https://poli.instructure.com/courses/11280/quizzes/41088 1/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Historial de intentos
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;
https://poli.instructure.com/courses/11280/quizzes/41088 2/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
1.0
29.8
9.933333333333334
4
11
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11280/quizzes/41088 3/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
Evitar que al cumplirse un caso, se evalúen los demás casos de la
secuencia.
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;
https://poli.instructure.com/courses/11280/quizzes/41088 4/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
r+=x/10;
r+=x%10;
System.out.println(x);
¡Correcto!
50
180
130
90
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
https://poli.instructure.com/courses/11280/quizzes/41088 5/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
3.0
11.0
1.0
2
3
-2
¡Correcto!
0.0
9.0
3.0
2
9
-1
1.0
9.0
1.0
2
3
-1
2.0
9.0
1.0
3
9
-2
String a = "hola";
String b = 'h' + "o" + 'l' + "a" + "";
boolean c = a.equals (b);
boolean e = !c;
char f = 'f';
https://poli.instructure.com/courses/11280/quizzes/41088 6/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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
¡Correcto!
hola
hola
true
false
f
f
false
https://poli.instructure.com/courses/11280/quizzes/41088 7/22
21/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);
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
e
e
d+e
de!
de
https://poli.instructure.com/courses/11280/quizzes/41088 8/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
d
e
de
de
de!
¡Correcto!
True
False
¡Correcto!
System.out.println("Hola Mundo");
https://poli.instructure.com/courses/11280/quizzes/41088 9/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Screen;
¡Correcto!
import java.util.Scanner;
import java.util.Math;
import java.Scanner;
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 r3=0;
int x=3;
float a=28.99f;
int b=6;
x=(int)a;
b--;
x=x % b * b % x - 6;
System.out.println(x);
34
9 (9..9)
https://poli.instructure.com/courses/11280/quizzes/41088 10/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
9
-0.92135647
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) {
int j = 1;
while (j < m) {
if (j <= n)
else
} else {
https://poli.instructure.com/courses/11280/quizzes/41088 11/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
j = j + 1;
System.out.println ();
i = i + 1;
¡Correcto! 123454321
1234321
12321
121
1
1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
123451
1234
12
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
https://poli.instructure.com/courses/11280/quizzes/41088 12/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
2.0
9.0
1.0
3
9
-2
3.0
11.0
1.0
2
3
-2
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11280/quizzes/41088 13/22
21/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
false
true
true
false
false
true
true
true
true
true
https://poli.instructure.com/courses/11280/quizzes/41088 14/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
false
true
true
true
false
false
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;
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);
false
true
false
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 15/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
false
true
true
true
false
false
¿Cual es la manera correcta para tomar datos del teclado de tipo entero,
teniendo en cuenta que la variable que tomo para guardar mis datos es
teclado?
nombre_variable = teclado();
¡Correcto!
nombre_variable = teclado.nextInt();
nombre_variable = teclado.nextLine();
nombre_variable = teclado.nextDouble();
https://poli.instructure.com/courses/11280/quizzes/41088 16/22
21/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)
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11280/quizzes/41088 17/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
2.0
9.0
1.0
3
9
-2
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 a = 1;
int b = 2;
int c = 5;
https://poli.instructure.com/courses/11280/quizzes/41088 18/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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
2
3
6
15
11
17
1
2
5
15
12
17
1
3
5
15
10
17
https://poli.instructure.com/courses/11280/quizzes/41088 19/22
21/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)
a = a + b;
b = a - b;
a = a - b;
a = 32 , b = 15
a = 32 , b = 17
¡Correcto! a = 17 , b = 32
a = 49 , b = 32
a = 15 , b = 15
boolean a = false;
boolean b = true;
boolean c = !a;
boolean d = a || b;
boolean e = d || c && !a;
boolean f = true && !e;
https://poli.instructure.com/courses/11280/quizzes/41088 20/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
false
true
false
true
true
false
false
true
true
true
false
false
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 21/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
División
Multiplicación
Resta
¡Correcto! Módulo
Calificación de la evaluación: 75 de 75
https://poli.instructure.com/courses/11280/quizzes/41088 22/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Instrucciones
https://poli.instructure.com/courses/11280/quizzes/41088 1/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Historial de intentos
¡Correcto!
System.out.println("Hola Mundo");
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 2/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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(r);
33
¡Correcto! 83 (83..83)
23
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 a = 1;
int b = 2;
https://poli.instructure.com/courses/11280/quizzes/41088 3/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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
2
3
6
15
11
17
¡Correcto!
1
2
5
15
11
17
1
3
5
15
10
17
https://poli.instructure.com/courses/11280/quizzes/41088 4/22
21/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)
int i = 1, j = 2, k = 0;
1.0
9.0
1.0
2
3
-1
1.0
29.8
9.933333333333334
4
11
https://poli.instructure.com/courses/11280/quizzes/41088 5/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
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;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
https://poli.instructure.com/courses/11280/quizzes/41088 6/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
1.0
9.0
1.0
2
3
-1
3.0
11.0
1.0
2
3
-2
2.0
9.0
1.0
3
9
-2
¿Cual es la manera correcta para tomar datos del teclado de tipo entero,
teniendo en cuenta que la variable que tomo para guardar mis datos es
teclado?
https://poli.instructure.com/courses/11280/quizzes/41088 7/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
nombre_variable = teclado.nextDouble();
nombre_variable = teclado.nextLine();
nombre_variable = teclado();
División
Resta
¡Correcto! Módulo
Multiplicación
¡Correcto! True
False
False
¡Correcto!
True
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 9/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (i);
¡Correcto! 10
9
8
7
6
5
4
3
2
1
0
20
19
18
17
16
15
14
13
12
11
10
Error de compilación
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11280/quizzes/41088 10/22
21/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;
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);
false
true
false
true
true
false
¡Correcto!
false
true
true
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 11/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
false
true
true
true
false
false
false
true
true
true
true
true
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 );
https://poli.instructure.com/courses/11280/quizzes/41088 12/22
21/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
¡Correcto!
hola
hola
true
false
f
f
false
Ejercicio de Compilación:
1. Ingrese a eclipse.
https://poli.instructure.com/courses/11280/quizzes/41088 13/22
21/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 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);
130
180
¡Correcto! 50
90
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
https://poli.instructure.com/courses/11280/quizzes/41088 14/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11280/quizzes/41088 15/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
hola
hola
false
false
f
g
false
hola
hola_
false
true
g
f
false
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Screen;
¡Correcto!
import java.util.Scanner;
import java.util.Math;
import java.Scanner;
https://poli.instructure.com/courses/11280/quizzes/41088 16/22
21/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);
false
true
true
true
true
true
false
true
true
true
false
false
¡Correcto!
false
true
true
true
true
false
false
true
false
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 17/22
21/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)
int x=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/11280/quizzes/41088 18/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
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)
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
String u = i + "" + n + j + "!";
https://poli.instructure.com/courses/11280/quizzes/41088 19/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
d
e
de
de
de!
e
e
d+e
de!
de
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
https://poli.instructure.com/courses/11280/quizzes/41088 20/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
int n=2;
if (i>j){
System.out.print (j+2);
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
System.out.println();
1
222
4
232
¡Correcto! 1
232
https://poli.instructure.com/courses/11280/quizzes/41088 21/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
4
444
Calificación de la evaluación: 75 de 75
https://poli.instructure.com/courses/11280/quizzes/41088 22/22
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
10 / 10 ptos.
Pregunta 1
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=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 1/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa los
dígitos impares de un número de 3 cifras y O representa los dígitos pares.
10 / 10 ptos.
Pregunta 2
¡Correcto!
10 / 10 ptos.
Pregunta 3
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 2/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
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)
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);
d
e
de
de
d2!
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
de!
e
e
d+e
de!
de
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 3/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
10 / 10 ptos.
Pregunta 4
¡Correcto! True
False
10 / 10 ptos.
Pregunta 5
¡Correcto! Módulo
Resta
Multiplicación
División
10 / 10 ptos.
Pregunta 6
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);
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 4/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
false
true
false
true
true
false
false
true
true
true
false
false
10 / 10 ptos.
Pregunta 7
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/1769/quizzes/8612/history?version=1 5/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
int r3=0;
int x=3;
float a=28.99f;
int b=6;
x=(int)a;
b--;
x=x % b * b % x - 6;
System.out.println(x);
9 (9..9)
-0.92135647
34
¡Correcto! 9
10 / 10 ptos.
Pregunta 8
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;
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 );
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 6/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
¡Correcto!
hola
hola
true
false
f
f
false
hola_
hola
false
false
g
g
false
hola
hola
false
false
f
g
false
hola
hola_
false
true
g
f
false
10 / 10 ptos.
Pregunta 9
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 7/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
x=+10; //línea 6
Línea 1
¡Correcto! Línea 5
Línea 3
Línea 2
Línea 6
Línea 4
0 / 10 ptos.
Pregunta 10
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);
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 8/9
20/10/2017 Historial de evaluaciones para Velasquez Penas Carol Mariana: Examen parcial - Semana 4
Respuesta correcta 10
9
8
7
6
5
4
3
2
1
0
Respondido
20
19
18
17
16
15
14
13
12
11
10
1.0
9.0
1.0
2
3
-1
Error de compilación
https://poli.instructure.com/courses/1769/quizzes/8612/history?version=1 9/9
Calificación para este intento: 75 de 75
Presentado 13 abr en 4:05
Este intento tuvo una duración de 74 minutos.
Pregunta 1
3.75 / 3.75 ptos.
¿Que tipo de operación realiza el % en Java ?
Resta
División
Módulo
Multiplicación
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)
a = a + b;
b = a - b;
a = a - b;
a = 17 , b = 32
a = 32 , b = 17
a = 15 , b = 15
a = 49 , b = 32
a = 32 , b = 15
Pregunta 3
3.75 / 3.75 ptos.
Cuál es la salida del siguiente programa en JAVA?
int i = 1, j = 2, k = 0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
1.0
9.0
1.0
-1
2.0
9.0
1.0
-2
0.0
9.0
3.0
-1
3.0
11.0
1.0
-2
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)
tp = 1, tc = 3;
tp = 2, tc = 2;
tp = 3, tc = 3;
tp = 2, tc = 1.
double de = 0.0;
if (tp == 1) {
de = 0.01;
}
else if (tp == 2) {
if (tc == 1)
de = 0.02;
else if (tc == 2)
de = 0.03;
else if (tc == 3)
de = 0.04;
} else {
de = 0.0;
}
System.out.println(de);
de = 0.03 para tp = 1, tc = 3
de = 0.01 para tp = 2, tc = 2
de = 0.00 para tp = 3, tc = 3
de = 0.02 para tp = 2, tc = 1
de = 0.01 para tp = 1, tc = 3
de = 0.03 para tp = 2, tc = 2
de = 0.02 para tp = 3, tc = 3
de = 0.01 para tp = 2, tc = 1
de = 0.02 para tp = 1, tc = 3
de = 0.01 para tp = 2, tc = 2
de = 0.03 para tp = 3, tc = 3
de = 0.02 para tp = 2, tc = 1
de = 0.01 para tp = 1, tc = 3
de = 0.02 para tp = 2, tc = 2
de = 0.02 para tp = 3, tc = 3
de = 0.02 para tp = 2, tc = 1
de = 0.01 para tp = 1, tc = 3
de = 0.03 para tp = 2, tc = 2
de = 0.00 para tp = 3, tc = 3
de = 0.02 para tp = 2, tc = 1
de = 0.01 para tp = 1, tc = 3
de = 0.03 para tp = 2, tc = 2
de = 0.02 para tp = 3, tc = 3
de = 0.02 para tp = 2, tc = 1
Pregunta 5
3.75 / 3.75 ptos.
Cuál es la salida del siguiente programa en JAVA?
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);
15
12
17
15
11
17
15
10
17
2
3
15
11
17
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 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);
3
6
15
11
17
15
12
17
15
11
17
15
10
17
Pregunta 7
3.75 / 3.75 ptos.
Unir el tipo de variable con el tipo de datos que soporta.
bool
True/False
Char
Caracteres
Double
Decimales
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 i = 1, j = 2, k = 0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
3.0
11.0
1.0
-2
2.0
9.0
1.0
-2
1.0
9.0
1.0
-1
0.0
9.0
3.0
2
9
-1
Pregunta 9
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(r);
83 (83..83)
23
33
Pregunta 10
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";
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 );
hola
hola_
false
true
g
f
false
hola
hola
true
false
false
hola
hola
false
false
false
hola_
hola
false
false
false
Pregunta 11
3.75 / 3.75 ptos.
La palabra reservada else se utiliza principalmente para:
Garantizar que las condiciones coincidan con los bloques de instrucciones asignados para
cada caso
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)
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);
50
90
180
130
Pregunta 13
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)
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);
true
true
true
true
true
true
true
true
true
true
true
false
false
true
true
true
true
false
false
true
true
true
true
true
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)
30
500
308
200
109
Pregunta 15
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)
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
de
de
de!
d
e
d+e
de
d2e!
de
de
d2!
d+e
de!
de
Pregunta 16
3.75 / 3.75 ptos.
Cuál es la salida del siguiente programa en JAVA?
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
de
de
de!
d+e
de
d2e!
d+e
de!
de
de
de
d2!
Pregunta 17
3.75 / 3.75 ptos.
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Screen;
import java.util.Scanner;
import java.Scanner;
import java.util.Math;
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)
System.out.println (i);
Error de compilación
20
19
18
17
16
15
14
13
12
11
10
10
9
8
7
6
5
4
3
2
1
0
1.0
9.0
1.0
-1
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)
int n=2;
for (int i=1; i<=n; i++){
for (int j=n; j>=1; j--){
if (i>j){
System.out.print (j+2);
}else{
System.out.print (" ");
}
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
}
}
System.out.println();
}
4
444
1
232
4
232
1
222
Pregunta 20
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=5;
int m = n * 2;
int i = 1;
while (i <= n) {
int j = 1;
while (j < m) {
if (j >= i && j <= m - i) {
if (j <= n)
System.out.print (" " + (j - i + 1) + " ");
else
System.out.print (" " + (m - j - i + 1) + " ");
} else {
System.out.print (" ");
}
j = j + 1;
}
System.out.println ();
i = i + 1;
}
123451
1234
12
123454321
1234321
12321
121
1
1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
Calificación de la evaluación: 75 de 75
AnteriorSiguiente
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Instrucciones
Historial de intentos
Intento Tiempo Puntaje
ÚLTIMO Intento 1 56 minutos 52.5 de 75
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 1/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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)
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);
d
e
de
de
d2!
¡Correcto!
d
e
d+e
de
d2e!
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 2/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
d
e
de
de
de!
e
e
d+e
de!
de
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) {
int j = 1;
while (j < m) {
if (j <= n)
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 3/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
else
} else {
j = j + 1;
System.out.println ();
i = i + 1;
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
123451
1234
12
1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
¡Correcto! 123454321
1234321
12321
121
1
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 4/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Respuesta correcta
System.out.println("Hola Mundo");
Respondido
Ninguna de las anteriores
¡Correcto!
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 5/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
2
3
6
15
11
17
1
2
5
15
12
17
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 6/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1
3
5
15
10
17
Respondido
False
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);
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 7/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
d
e
d+e
de
d2e!
e
e
d+e
de!
de
d
e
de
de
d2!
d
e
de
de
de!
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/3456/assignments/24025/submissions/37915 8/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int n=2;
if (i>j){
System.out.print (j+2);
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
System.out.println();
4
444
Respondido 1
222
4
232
Respuesta correcta 1
232
Ejercicio de Compilación:
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 9/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 10/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa los
dígitos impares de un número de 3 cifras y O representa los dígitos pares.
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 = 15 , b = 15
Respondido a = 49 , b = 32
Respuesta correcta a = 17 , b = 32
a = 32 , b = 15
a = 32 , b = 17
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 11/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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/3456/assignments/24025/submissions/37915 12/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 13/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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/3456/assignments/24025/submissions/37915 14/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2
3
6
15
11
17
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;
1.0
29.8
9.933333333333334
4
11
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 15/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Respuesta correcta
0.0
9.0
3.0
2
9
-1
Respondido
1.0
9.0
1.0
2
3
-1
3.0
11.0
1.0
2
3
-2
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;
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 16/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
boolean c = !a;
boolean d = a || b;
System.out.println (a);
System.out.println (b);
System.out.println (c);
System.out.println (d);
System.out.println (e);
System.out.println (f);
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
true
true
true
true
true
true
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 17/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
true
true
true
true
true
false
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
de!
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 18/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
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 );
hola
hola
false
false
f
g
false
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 19/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
hola
hola
true
false
f
f
false
hola
hola_
false
true
g
f
false
hola_
hola
false
false
g
g
false
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)
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 20/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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);
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
e
e
d+e
de!
de
d
e
de
de
de!
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 21/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
false
true
true
false
false
true
true
true
false
false
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 22/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
false
true
true
true
true
true
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;
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);
false
true
true
true
true
true
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 23/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
false
true
true
true
true
false
false
true
false
true
true
false
false
true
true
true
false
false
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);
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 24/25
19/12/2017 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2
3
6
15
11
17
1
2
5
15
12
17
1
3
5
15
10
17
¡Correcto!
1
2
5
15
11
17
https://poli.instructure.com/courses/3456/assignments/24025/submissions/37915 25/25
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Instrucciones
https://poli.instructure.com/courses/11280/quizzes/41088 1/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
Historial de intentos
¡Correcto!
System.out.println("Hola Mundo");
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 2/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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(r);
33
¡Correcto! 83 (83..83)
23
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 a = 1;
int b = 2;
https://poli.instructure.com/courses/11280/quizzes/41088 3/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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
2
3
6
15
11
17
¡Correcto!
1
2
5
15
11
17
1
3
5
15
10
17
https://poli.instructure.com/courses/11280/quizzes/41088 4/22
21/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)
int i = 1, j = 2, k = 0;
1.0
9.0
1.0
2
3
-1
1.0
29.8
9.933333333333334
4
11
https://poli.instructure.com/courses/11280/quizzes/41088 5/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
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;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
https://poli.instructure.com/courses/11280/quizzes/41088 6/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
1.0
9.0
1.0
2
3
-1
3.0
11.0
1.0
2
3
-2
2.0
9.0
1.0
3
9
-2
¿Cual es la manera correcta para tomar datos del teclado de tipo entero,
teniendo en cuenta que la variable que tomo para guardar mis datos es
teclado?
https://poli.instructure.com/courses/11280/quizzes/41088 7/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
nombre_variable = teclado.nextDouble();
nombre_variable = teclado.nextLine();
nombre_variable = teclado();
División
Resta
¡Correcto! Módulo
Multiplicación
¡Correcto! True
False
False
¡Correcto!
True
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 9/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (i);
¡Correcto! 10
9
8
7
6
5
4
3
2
1
0
20
19
18
17
16
15
14
13
12
11
10
Error de compilación
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11280/quizzes/41088 10/22
21/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;
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);
false
true
false
true
true
false
¡Correcto!
false
true
true
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 11/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
false
true
true
true
false
false
false
true
true
true
true
true
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 );
https://poli.instructure.com/courses/11280/quizzes/41088 12/22
21/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
¡Correcto!
hola
hola
true
false
f
f
false
Ejercicio de Compilación:
1. Ingrese a eclipse.
https://poli.instructure.com/courses/11280/quizzes/41088 13/22
21/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 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);
130
180
¡Correcto! 50
90
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
https://poli.instructure.com/courses/11280/quizzes/41088 14/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
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
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11280/quizzes/41088 15/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
hola
hola
false
false
f
g
false
hola
hola_
false
true
g
f
false
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Screen;
¡Correcto!
import java.util.Scanner;
import java.util.Math;
import java.Scanner;
https://poli.instructure.com/courses/11280/quizzes/41088 16/22
21/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);
false
true
true
true
true
true
false
true
true
true
false
false
¡Correcto!
false
true
true
true
true
false
false
true
false
true
true
false
https://poli.instructure.com/courses/11280/quizzes/41088 17/22
21/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)
int x=700;
else {
else {
else {
System.out.println(cadena);
https://poli.instructure.com/courses/11280/quizzes/41088 18/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
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)
char i = 'd';
char j = 'e';
int n = 2;
String s = "d+e";
String t = "de";
String u = i + "" + n + j + "!";
https://poli.instructure.com/courses/11280/quizzes/41088 19/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
System.out.println (i);
System.out.println (j);
System.out.println (s);
System.out.println (t);
System.out.println (u);
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
d
e
de
de
de!
e
e
d+e
de!
de
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
https://poli.instructure.com/courses/11280/quizzes/41088 20/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
int n=2;
if (i>j){
System.out.print (j+2);
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
System.out.println();
1
222
4
232
¡Correcto! 1
232
https://poli.instructure.com/courses/11280/quizzes/41088 21/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO2]
4
444
Calificación de la evaluación: 75 de 75
https://poli.instructure.com/courses/11280/quizzes/41088 22/22
Examen parcial - Semana 4
Instrucciones
Volver a realizar la evaluación
Historial de intentos
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;
}
Respondido
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
espuesta 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
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
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
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
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 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
1
3
5
15
10
17
¡Correcto!
1
2
5
15
11
17
2
3
6
15
11
17
¡Correcto! True
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=700;
else {
else {
else {
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
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 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);
System.out.println (e);
System.out.println (f);
¡Correcto!
false
true
true
true
true
false
true
true
true
true
true
true
true
true
true
true
true
false
false
true
true
true
true
true
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Screen;
import java.util.Math;
import java.Scanner;
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)
resultado=a * b;
500
30
¡Correcto! 308
109
200
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
hola
hola
false
false
f
g
false
hola_
hola
false
false
g
g
false
hola
hola_
false
true
g
f
false
Pregunta 9 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)
tp = 1 , tc = 3 ;
tp = 2 , tc = 2 ;
tp = 3 , tc = 3 ;
tp = 2 , tc = 1 .
double de = 0.0;
if (tp == 1) {
de = 0.01;
}
else if (tp == 2) {
if (tc == 1)
de = 0.02;
else if (tc == 2)
de = 0.03;
else if (tc == 3)
de = 0.04;
} else {
de = 0.0;
}
System.out.println(de);
de = 0.03 para tp = 1 , tc = 3
de = 0.01 para tp = 2 , tc = 2
de = 0.00 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
de = 0.01 para tp = 1 , tc = 3
de = 0.03 para tp = 2 , tc = 2
de = 0.02 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
de = 0.01 para tp = 1 , tc = 3
de = 0.03 para tp = 2 , tc = 2
de = 0.02 para tp = 3 , tc = 3
de = 0.01 para tp = 2 , tc = 1
de = 0.01 para tp = 1 , tc = 3
de = 0.02 para tp = 2 , tc = 2
de = 0.02 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
de = 0.02 para tp = 1 , tc = 3
de = 0.01 para tp = 2 , tc = 2
de = 0.03 para tp = 3 , tc = 3
de = 0.02 para tp = 2 , tc = 1
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);
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
de!
d
e
de
de
d2!
e
e
d+e
de!
de
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
1.0
9.0
1.0
2
3
-1
2.0
9.0
1.0
3
9
-2
espuesta correcta
Evitar que al cumplirse un caso, se evalúen los demás casos de la
secuencia.
¿Cual es la manera correcta para tomar datos del teclado de tipo entero,
teniendo en cuenta que la variable que tomo para guardar mis datos es
teclado?
nombre_variable = teclado.nextLine();
nombre_variable = teclado();
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);
¡Correcto! 50
90
130
180
Pregunta 15 3.75 / 3.75 ptos.
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
¡Correcto!
0.0
9.0
3.0
2
9
-1
2.0
9.0
1.0
3
9
-2
1.0
9.0
1.0
2
3
-1
3.0
11.0
1.0
2
3
-2
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;
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);
false
true
false
true
true
false
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
false
true
true
true
false
false
Respondido False
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 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
2
3
6
15
11
17
1
2
5
15
12
17
1
3
5
15
10
17
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=700;
else {
else {
System.out.println(cadena);
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
¡Correcto! Char
Caracteres
Calificación de la evaluación: 60 de 75
×
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Instrucciones
https://poli.instructure.com/courses/11279/quizzes/41084 1/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Historial de intentos
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);
1.0
9.0
1.0
2
3
-1
https://poli.instructure.com/courses/11279/quizzes/41084 2/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
20
19
18
17
16
15
14
13
12
11
10
Error de compilación
¡Correcto! 10
9
8
7
6
5
4
3
2
1
0
¡Correcto! bool
True/False
https://poli.instructure.com/courses/11279/quizzes/41084 3/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
https://poli.instructure.com/courses/11279/quizzes/41084 4/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
d
e
de
de
de!
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);
false
true
true
true
true
true
Respondido
false
true
false
true
true
false
https://poli.instructure.com/courses/11279/quizzes/41084 5/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
false
true
true
true
false
false
espuesta correcta
false
true
true
true
true
false
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;
https://poli.instructure.com/courses/11279/quizzes/41084 6/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
System.out.println (j);
System.out.println (k);
¡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
3.0
11.0
1.0
2
3
-2
int a = 1;
int b = 2;
https://poli.instructure.com/courses/11279/quizzes/41084 7/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
2
3
6
15
11
17
1
2
5
15
12
17
1
3
5
15
10
17
https://poli.instructure.com/courses/11279/quizzes/41084 8/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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);
d
e
de
de
de!
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
d2!
e
e
d+e
de!
de
https://poli.instructure.com/courses/11279/quizzes/41084 9/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Screen;
¡Correcto!
import java.util.Scanner;
import java.util.Math;
import java.Scanner;
¡Correcto!
4
Ejercicio de Compilación:
https://poli.instructure.com/courses/11279/quizzes/41084 10/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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=700;
else {
else {
else {
System.out.println(cadena);
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
https://poli.instructure.com/courses/11279/quizzes/41084 11/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
https://poli.instructure.com/courses/11279/quizzes/41084 12/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
2
3
6
15
11
17
1
2
5
15
12
17
1
3
5
15
10
17
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;
https://poli.instructure.com/courses/11279/quizzes/41084 13/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
r+=x/1000;
x=x%1000;
r+=x/100;
x=x%100;
r+=x/10;
r+=x%10;
System.out.println(x);
90
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;
https://poli.instructure.com/courses/11279/quizzes/41084 14/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
x=x%1000;
/*
r+=x/100;
x=x%100;
*/
r+=x/10;
r+=x%10;
System.out.println(r);
¡Correcto! 83 (83..83)
33
23
False
¡Correcto! True
Ejercicio de Compilación:
1. Ingrese a eclipse.
2. Cree un proyecto.
3. Cree una clase.
https://poli.instructure.com/courses/11279/quizzes/41084 15/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int i = 1, j = 2, k = 0;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
j += k + 2;
k--;
System.out.println (x);
System.out.println (y );
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
2.0
9.0
1.0
3
9
-2
1.0
9.0
1.0
2
3
-1
¡Correcto!
0.0
9.0
3.0
2
9
-1
https://poli.instructure.com/courses/11279/quizzes/41084 16/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
3.0
11.0
1.0
2
3
-2
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=700;
else {
else {
else {
System.out.println(cadena);
¡Correcto!
El programa genera una cadena compuesta de X y O. Donde X representa
los dígitos impares de un número de 3 cifras y O representa los dígitos
pares.
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/11279/quizzes/41084 18/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
2
3
6
15
11
17
https://poli.instructure.com/courses/11279/quizzes/41084 19/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1
3
5
15
10
17
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);
}else{
if (i>=j){
System.out.print (i);
}else{
System.out.print ("");
https://poli.instructure.com/courses/11279/quizzes/41084 20/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
System.out.println();
4
444
4
232
1
222
¡Correcto! 1
232
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;
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);
https://poli.instructure.com/courses/11279/quizzes/41084 21/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
System.out.println (e);
System.out.println (f);
false
true
true
true
true
true
Respondido
false
true
false
true
true
false
espuesta correcta
false
true
true
true
true
false
false
true
true
true
false
false
https://poli.instructure.com/courses/11279/quizzes/41084 22/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
hola
hola_
false
true
g
f
false
hola
hola
false
false
f
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 23/24
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
hola_
hola
false
false
g
g
false
https://poli.instructure.com/courses/11279/quizzes/41084 24/24