Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Examen Parcial - Semana 4 - RA - PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES - (GRUPO4) - 2 PDF
Examen Parcial - Semana 4 - RA - PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES - (GRUPO4) - 2 PDF
Instrucciones
https://poli.instructure.com/courses/11282/quizzes/41096 1/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
Historial de intentos
https://poli.instructure.com/courses/11282/quizzes/41096 2/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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);
¡Correcto!
1
2
5
15
11
17
https://poli.instructure.com/courses/11282/quizzes/41096 3/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
1
2
5
15
12
17
1
3
5
15
10
17
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 x=26750,r=0;
r+=x/10000;
x=x%10000;
https://poli.instructure.com/courses/11282/quizzes/41096 4/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
r+=x/1000;
x=x%1000;
r+=x/100;
x=x%100;
r+=x/10;
r+=x%10;
System.out.println(x);
90
¡Correcto!
50
130
180
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/11282/quizzes/41096 5/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
false
true
true
true
false
false
false
true
true
true
true
true
false
true
false
true
true
false
¡Correcto!
false
true
true
true
true
false
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;
https://poli.instructure.com/courses/11282/quizzes/41096 6/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
https://poli.instructure.com/courses/11282/quizzes/41096 7/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
¡Correcto!
0.0
9.0
3.0
2
9
-1
2.0
9.0
1.0
3
9
-2
https://poli.instructure.com/courses/11282/quizzes/41096 8/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
1.0
9.0
1.0
2
3
-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 n=2;
https://poli.instructure.com/courses/11282/quizzes/41096 9/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
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/11282/quizzes/41096 10/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
¡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
False
https://poli.instructure.com/courses/11282/quizzes/41096 11/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
¡Correcto! 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);
1
3
5
15
10
17
1
2
5
15
12
17
https://poli.instructure.com/courses/11282/quizzes/41096 12/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
¡Correcto!
1
2
5
15
11
17
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 n=5;
int m = n * 2;
int i = 1;
while (i <= n) {
int j = 1;
while (j < m) {
https://poli.instructure.com/courses/11282/quizzes/41096 13/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
if (j <= n)
else
} else {
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
1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
123451
1234
12
https://poli.instructure.com/courses/11282/quizzes/41096 14/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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();
1
222
https://poli.instructure.com/courses/11282/quizzes/41096 15/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
4
232
¡Correcto! 1
232
4
444
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 {
https://poli.instructure.com/courses/11282/quizzes/41096 16/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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.
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/11282/quizzes/41096 17/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
¡Correcto!
hola
hola
true
false
f
f
false
https://poli.instructure.com/courses/11282/quizzes/41096 18/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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;
30
https://poli.instructure.com/courses/11282/quizzes/41096 19/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
200
500
¡Correcto! 308
109
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/11282/quizzes/41096 20/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
https://poli.instructure.com/courses/11282/quizzes/41096 21/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
https://poli.instructure.com/courses/11282/quizzes/41096 22/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
¡Correcto!
1
2
5
15
11
17
1
3
5
15
10
17
2
3
6
15
11
17
¡Correcto!
Módulo
División
Resta
Multiplicación
https://poli.instructure.com/courses/11282/quizzes/41096 23/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
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
3
5
15
10
17
¡Correcto!
1
2
5
15
11
17
https://poli.instructure.com/courses/11282/quizzes/41096 24/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
1
2
5
15
12
17
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)
System.out.println (i);
https://poli.instructure.com/courses/11282/quizzes/41096 25/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
1.0
9.0
1.0
2
3
-1
¡Correcto! 10
9
8
7
6
5
4
3
2
1
0
Error de compilación
20
19
18
17
16
15
14
13
12
11
10
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
hola
hola
false
false
f
g
false
hola
hola_
false
true
g
f
false
https://poli.instructure.com/courses/11282/quizzes/41096 27/28
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO4]
¡Correcto!
hola
hola
true
false
f
f
false
Calificación de la evaluación: 75 de 75
https://poli.instructure.com/courses/11282/quizzes/41096 28/28