Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Examen Parcial - Semana 4 - RA - PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES - (GRUPO3) PDF
Examen Parcial - Semana 4 - RA - PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES - (GRUPO3) PDF
Instrucciones
https://poli.instructure.com/courses/11281/quizzes/41094 1/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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)
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/11281/quizzes/41094 2/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡Correcto!
d
e
d+e
de
d2e!
d
e
de
de
de!
e
e
d+e
de!
de
d
e
de
de
d2!
https://poli.instructure.com/courses/11281/quizzes/41094 3/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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)
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/11281/quizzes/41094 4/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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
¡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
https://poli.instructure.com/courses/11281/quizzes/41094 5/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡Correcto!
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;
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/11281/quizzes/41094 6/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡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 r3=0;
int x=3;
float a=28.99f;
https://poli.instructure.com/courses/11281/quizzes/41094 7/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
int b=6;
x=(int)a;
b--;
x=x % b * b % x - 6;
System.out.println(x);
-0.92135647
¡Correcto! 9
9 (9..9)
34
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) {
https://poli.instructure.com/courses/11281/quizzes/41094 8/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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.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.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.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.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
https://poli.instructure.com/courses/11281/quizzes/41094 9/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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!
d
e
de
de
d2!
e
e
d+e
de!
de
¡Correcto!
d
e
d+e
de
d2e!
https://poli.instructure.com/courses/11281/quizzes/41094 10/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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/11281/quizzes/41094 11/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡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)
int x=26750,r=0;
r+=x/10000;
x=x%10000;
r+=x/1000;
https://poli.instructure.com/courses/11281/quizzes/41094 12/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
x=x%1000;
r+=x/100;
x=x%100;
r+=x/10;
r+=x%10;
System.out.println(x);
180
130
¡Correcto! 50
90
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/11281/quizzes/41094 13/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
1
2
5
15
12
17
¡Correcto!
1
2
5
15
11
17
2
3
6
15
11
17
1
3
5
15
10
17
https://poli.instructure.com/courses/11281/quizzes/41094 14/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡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/11281/quizzes/41094 15/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
r+=x/10;
r+=x%10;
System.out.println(r);
¡Correcto! 83 (83..83)
33
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)
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/11281/quizzes/41094 16/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡Correcto!
hola
hola
true
false
f
f
false
hola_
hola
false
false
g
g
false
hola
hola_
false
true
g
f
false
hola
hola
false
false
f
g
false
https://poli.instructure.com/courses/11281/quizzes/41094 17/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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
3.0
11.0
1.0
2
3
-2
¡Correcto!
0.0
9.0
3.0
2
9
-1
https://poli.instructure.com/courses/11281/quizzes/41094 18/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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 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/11281/quizzes/41094 19/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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)
boolean a = false;
boolean b = true;
boolean c = !a;
https://poli.instructure.com/courses/11281/quizzes/41094 20/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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
false
true
true
false
¡Correcto!
false
true
true
true
true
false
false
true
true
true
false
false
https://poli.instructure.com/courses/11281/quizzes/41094 21/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡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)
boolean a = false;
boolean b = true;
boolean c = !a;
boolean d = a || b;
https://poli.instructure.com/courses/11281/quizzes/41094 22/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
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
true
true
true
true
true
true
true
true
true
true
true
false
https://poli.instructure.com/courses/11281/quizzes/41094 23/24
23/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO3]
¡Correcto!
false
true
true
true
true
false
Calificación de la evaluación: 75 de 75
https://poli.instructure.com/courses/11281/quizzes/41094 24/24