Examen Programacion
Examen Programacion
Michelle Alejandra
Las respuestas correctas estarán disponibles del 15 de mayo en 0:00 al 15 de mayo en 23:55.
Pregunta 1 8 / 8 ptos.
int i=0;
while(i<=10) {
System.out.println(i);
i++;
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 1/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Pregunta 2 8 / 8 ptos.
int numero;
Scanner entrada = new Scanner(System.in);
System.out.println("Ingrese el número de filas y de columnas de la
matriz");
numero = entrada.nextInt();
float[][] matriz = new float[numero][numero];
No compila
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 2/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Pregunta 3 8 / 8 ptos.
El método recursivo
int metodo(int n)
if(n == 0) return 1;
Permite:
Calcular 2-n
Calcular 2n
Calcular el factorial de 2
Pregunta 4 8 / 8 ptos.
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 3/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Java es un lenguaje flexible que puede ser usado para el control de dispositivos
como teléfonos móviles
False
True
Pregunta 5 8 / 8 ptos.
int x=2;
double resultado= x*x*x + 2*x*x + x + 3;
System.out.println(resultado);
int x=2;
double resultado= (2x)^3 + (2x)^2 + x + 3;
System.out.println(resultado);
int x=2;
double resultado= (2x^3 + 2x)^2 + x + 3;
System.out.println(resultado);
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 4/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
int x=2;
double resultado= 2x^3 + 2x^2 + x + 3;
System.out.println(resultado);
Pregunta 6 8 / 8 ptos.
Pregunta 7 8 / 8 ptos.
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 5/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Pregunta 8 8 / 8 ptos.
break
Pregunta 9 8 / 8 ptos.
Igual que ==
Diferente de !=
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 6/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Menor que ‹
Pregunta 10 8 / 8 ptos.
False
True
Pregunta 11 8 / 8 ptos.
char i = 'A';
char j = 'B';
int n = 28;
String s = "C";
String t = "D";
String u = i + "" + n + j + "!";
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 7/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
System.out.println (j);
System.out.println (n);
System.out.println (n);
System.out.println (s);
System.out.println (u);
D
BC
CS
D
SA28B!
B
28
28
C
A28B!
XA
BA
C1
D
A2B!
A
B
C
D
A28B!
Pregunta 12 8 / 8 ptos.
a mul b Y a mul c
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 8/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
a mod (b+c)
a mul b + c
a mod (b+c) = 0
a mul (b+c) = 0
Pregunta 13 8 / 8 ptos.
double monto=120;
int meses = 12;
double interes=0.1;
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 9/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 10/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Pregunta 14 8 / 8 ptos.
El método recursivo
int metodo(int n)
if(n == 0)
return 2;
else if(n==1)
return 3;
else
1944
2348
1457
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 11/12
12/5/2019 Historial de evaluaciones para Caro Michelle Alejandra: Examen final - Semana 8
Pregunta 15 8 / 8 ptos.
https://poli.instructure.com/courses/8719/quizzes/33184/history?version=1 12/12