Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Instrucciones
https://poli.instructure.com/courses/8719/quizzes/33183 1/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Historial de intentos
https://poli.instructure.com/courses/8719/quizzes/33183 2/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
Las respuestas correctas estarán disponibles del 10 de abr en 0:00 al 10 de abr en 23:55.
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
https://poli.instructure.com/courses/8719/quizzes/33183 3/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
hola_
hola
false
false
g
g
false
hola
hola
true
false
f
f
false
hola
hola
false
false
f
g
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 );
https://poli.instructure.com/courses/8719/quizzes/33183 4/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
System.out.println (z);
System.out.println (i);
System.out.println (j);
System.out.println (k);
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
3.0
11.0
1.0
2
3
-2
Ejercicio de Compilación:
https://poli.instructure.com/courses/8719/quizzes/33183 5/26
6/4/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 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
11
17
2
3
6
15
11
17
https://poli.instructure.com/courses/8719/quizzes/33183 6/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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){
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!
https://poli.instructure.com/courses/8719/quizzes/33183 7/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
d
e
d+e
de
d2e!
e
e
d+e
de!
de
d
e
de
de
d2!
System.out.println("Hola Mundo");
https://poli.instructure.com/courses/8719/quizzes/33183 8/26
6/4/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!
e
e
d+e
de!
de
d
e
de
de
d2!
d
e
d+e
de
d2e!
https://poli.instructure.com/courses/8719/quizzes/33183 9/26
6/4/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/8719/quizzes/33183 10/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
https://poli.instructure.com/courses/8719/quizzes/33183 11/26
6/4/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 ();
https://poli.instructure.com/courses/8719/quizzes/33183 12/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
i = i + 1;
123451
1234
12
123454321
1234321
12321
121
1
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
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/8719/quizzes/33183 13/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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/8719/quizzes/33183 14/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
int n=2;
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
https://poli.instructure.com/courses/8719/quizzes/33183 15/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
2*1=2
2*2=4
2*3=6
2*4=8
2 * 5 = 10
2 * 6 = 12
2 * 7 = 14
2 * 8 = 16
2 * 9 = 18
2 * 10 = 20
https://poli.instructure.com/courses/8719/quizzes/33183 16/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
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/8719/quizzes/33183 17/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
3.0
11.0
1.0
2
3
-2
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
https://poli.instructure.com/courses/8719/quizzes/33183 18/26
6/4/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;
308
109
30
500
200
https://poli.instructure.com/courses/8719/quizzes/33183 19/26
6/4/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);
-0.92135647
9 (9..9)
34
https://poli.instructure.com/courses/8719/quizzes/33183 20/26
6/4/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;
double x = 2.1, y = 4.5, z = 10.0;
x = i / 2;
y *= 2;
z = y / 3.0;
i++;
j += k + 5;
https://poli.instructure.com/courses/8719/quizzes/33183 21/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
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
0.0
9.0
3.0
2
9
-1
1.0
9.0
1.0
2
3
-1
¿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.nextInt();
nombre_variable = teclado.nextDouble();
nombre_variable = teclado();
False
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/8719/quizzes/33183 23/26
6/4/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;
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
true
false
false
true
true
true
false
false
https://poli.instructure.com/courses/8719/quizzes/33183 24/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
false
true
false
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)
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
https://poli.instructure.com/courses/8719/quizzes/33183 25/26
6/4/2019 Examen parcial - Semana 4: RA/PRIMER BLOQUE-PROGRAMACION DE COMPUTADORES-[GRUPO1]
d
e
de
de
de!
d
e
de
de
d2!
d
e
d+e
de
d2e!
https://poli.instructure.com/courses/8719/quizzes/33183 26/26