Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Instrucciones
https://poli.instructure.com/courses/11279/quizzes/41084 1/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Historial de intentos
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/11279/quizzes/41084 2/22
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
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 n=5;
int m = n * 2;
int i = 1;
while (i <= n) {
https://poli.instructure.com/courses/11279/quizzes/41084 3/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int j = 1;
while (j < m) {
if (j <= n)
else
} else {
j = j + 1;
System.out.println ();
i = i + 1;
123451
1234
12
Respondido 1
10
1 0 -1
1 0 -1 -2
1 0 -1 -2 -3
1
01
-1 0 1
-2 -1 0 1
-3 -2 -1 0 1
https://poli.instructure.com/courses/11279/quizzes/41084 4/22
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 i = 1, j = 2, k = 0;
espuesta correcta
0.0
9.0
3.0
2
9
-1
3.0
11.0
1.0
2
3
-2
https://poli.instructure.com/courses/11279/quizzes/41084 5/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
1.0
29.8
9.933333333333334
4
11
Respondido
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 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);
espuesta correcta 9
Respondido 9 (9..9)
https://poli.instructure.com/courses/11279/quizzes/41084 6/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
34
-0.92135647
¿Que librería debo llamar de primeras para tomar un dato por teclado?
import java.util.Math;
import java.util.Screen;
¡Correcto!
import java.util.Scanner;
import java.Scanner;
nombre_variable = teclado.nextDouble();
nombre_variable = teclado.nextLine();
nombre_variable = teclado();
¡Correcto!
nombre_variable = teclado.nextInt();
https://poli.instructure.com/courses/11279/quizzes/41084 7/22
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 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);
¡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){
https://poli.instructure.com/courses/11279/quizzes/41084 8/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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 9/22
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);
d
e
de
de
de!
d
e
de
de
d2!
e
e
d+e
de!
de
https://poli.instructure.com/courses/11279/quizzes/41084 10/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡Correcto!
d
e
d+e
de
d2e!
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
https://poli.instructure.com/courses/11279/quizzes/41084 11/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
¡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 x=700;
else {
else {
https://poli.instructure.com/courses/11279/quizzes/41084 12/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
else {
System.out.println(cadena);
espuesta correcta
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){
https://poli.instructure.com/courses/11279/quizzes/41084 13/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
espuesta correcta 50
180
90
https://poli.instructure.com/courses/11279/quizzes/41084 14/22
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
d2!
https://poli.instructure.com/courses/11279/quizzes/41084 15/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
d
e
de
de
de!
espuesta correcta
d
e
d+e
de
d2e!
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
false
false
https://poli.instructure.com/courses/11279/quizzes/41084 16/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
false
true
false
true
true
false
false
true
true
true
true
true
¡Correcto!
false
true
true
true
true
false
Resta
Respondido Multiplicación
División
https://poli.instructure.com/courses/11279/quizzes/41084 17/22
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 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
https://poli.instructure.com/courses/11279/quizzes/41084 18/22
21/9/2019 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)
resultado=a * b;
¡Correcto! 308
30
109
200
500
https://poli.instructure.com/courses/11279/quizzes/41084 19/22
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);
1
2
5
15
12
17
1
3
5
15
10
17
¡Correcto!
1
2
5
15
11
17
https://poli.instructure.com/courses/11279/quizzes/41084 20/22
21/9/2019 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)
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
Calificación de la evaluación: 45 de 75
https://poli.instructure.com/courses/11279/quizzes/41084 21/22
21/9/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/11279/quizzes/41084 22/22