Miguel Arias
Quiz by , created more than 1 year ago

Evaluación de Unidad III

73
0
0
Miguel Arias
Created by Miguel Arias almost 9 years ago
Close

Evaluación III Quintos

Question 1 of 20

2

¿Cual es la forma correcta de asignar valores directamente a una variable?

Select one of the following:

  • a=int(input("dame un valor"))

  • a=15

  • Las dos anteriores son correctas

  • print("el resultado de la suma es ", c)

Explanation

Question 2 of 20

2

¿Para ejecutar el siguiente codigo nuestra variable iggs debera de ser de tipo?
iggs =( ti *4.83)/100

Select one of the following:

  • Int

  • string

  • float

Explanation

Question 3 of 20

2

Comando que depende de evaluar una condición para ejecutar una de dos opciones posibles.

Select one of the following:

  • If

  • Swich

  • For

Explanation

Question 4 of 20

2

¿Que realiza el siguiente código?

n1=int(input("Ingrese primer numero: "))

n2=int(input("Ingrese Segundo numero: "))

if n1>n2:

print(": ",n1)

else:

print("; ",n2)

Select one of the following:

  • Compara dos valores y muestra cual es el menor

  • Compara dos valores y muestra cual es el mayor

  • Compara dos valores y muestra cual es el menor y luego los suma

  • Compara dos valores y muestra cual es el menor y luego los asigna

Explanation

Question 5 of 20

2

¿Cuál es el error en el siguiente codigo?
a=int(input("Hasta que numero desea llegar: "))

i=1

while i<=a

if i%2==0:

print(i)

i=i+1

Select one of the following:

  • Falta el ;

  • Falta un :

  • Falta %

  • Falta una variable

Explanation

Question 6 of 20

2

¿Cuál es el codigo correcto que imprime los valores de 1 a 10?

Select one of the following:

  • for i in range(1,11)

    print(n)

  • for i in range(i,10)

    print(n);

  • for i in range(1,11):

    print(n)

  • for i in range(1,11)

    print("n")

Explanation

Question 7 of 20

2

Que símbolo es el equivalente a MOD en Python

Select one of the following:

  • &

  • %

  • !!

  • ¡!

Explanation

Question 8 of 20

2

¿Que realiza el siguente codigo?

a=int(input("Hasta que numero desea llegar: "))

for i in range(0,a+1):

if i%2==0:

print(i)

Select one of the following:

  • Imprime los numeros de 1 a 10

  • Imprime los numero impares de 1 a 10

  • Imprime los numero pares de 1 a 10

  • imprime los numeros pares de 1 a n

Explanation

Question 9 of 20

2

¿Es correcto el siguiente código?
a=input("dame otro valor")
b=input("dame otro valor")

c = a+b

print("el resultado de la suma es ", c)

Select one of the following:

  • True
  • False

Explanation

Question 10 of 20

2

Que hace la función int()

Select one of the following:

  • convierte un valor pasado en un cadena

  • convierte un valor pasado en un entero

  • convierte un valor pasado en un doble

Explanation

Question 11 of 20

2

¿si quiero comprar una nota para saber si gano o perdio un alumno que código utilizo?

Select one of the following:

  • if x >70

    print("felicidades ganaste")

    else:

    print("lo lamento perdiste")

  • if x >70:

    print("felicidades ganaste")

    else:

    print(lo lamento perdiste)

  • if x >70:

    print("felicidades ganaste")

    else:

    print("lo lamento perdiste")

  • if x >70:

    print("felicidades ganaste")

    else

    print("lo lamento perdiste")

Explanation

Question 12 of 20

2

¿si quiero pedir el nombre de una persona que código utilizo?

Select one or more of the following:

  • a=str(input("dame nombre del empleado"))

  • a=input("dame nombre del empleado")

  • a=int(input("dame nombre del empleado"))

  • a=float(input("dame nombre del empleado"))

  • las dos primeras son correctas

  • ninguna es correcta

Explanation

Question 13 of 20

2

si quiero promediar 3 notas que codigo utilizo

Select one or more of the following:

  • p=(n1+n2+n3)/3

  • p:(n1+n2+n3)-3

  • p.(n1+n2+n3)/3;

  • p=str(n1+n2+n3)/3

Explanation

Question 14 of 20

2

¿Es correcto el siguiente código?
if n1>n2 and n1>n3 :

Select one of the following:

  • True
  • False

Explanation

Question 15 of 20

2

¿Si quiero imprimir el nombre de una persona 10 veces que código utilizo?

Select one of the following:

  • nombre=input(Dame un nombre: )

    for i in range(1,11):

    print(nombre)

  • nombre=int(input("Dame un nombre: "))

    for i in range(1,11):

    print(nombre)

  • nombre=input("Dame un nombre: ")

    for i in range(1,11):

    print(nombre)

  • nombre=input("Dame un nombre: ")

    for i in range(1,11)

    print(nombre)

Explanation

Question 16 of 20

2

Si quiero imprimir el nombre de una persona y las veces que ella quiera. ¿que código utilizo?

Select one of the following:

  • nombre=input("Dame un nombre: ")

    c= int(input("Dame una cantidad: "))

    for i in range(1,c+1):

    print(nombres)

  • nombre=int(input("Dame un nombre: "))

    c= input("Dame una cantidad: ")

    for i in range(1,c+1):

    print(nombre)

  • nombre=input("Dame un nombre: ")

    c= int(input("Dame una cantidad: "))

    for i in range(1,c+1):

    print(nombre)

Explanation

Question 17 of 20

2

Si quiero imprimir los número pares del 1 al 10. ¿Que código utilizo?

Select one of the following:

  • for i in range (1,10):

    if i%2==0:

    print(i," es par")

    else:

    print(i," es impar")

  • for i in range (1,11):

    if i%2==0

    print(i," es par")

    else:

    print(i," es impar")

  • for i in range (1,11):

    if i%2==0:

    print(i," es par")

    else:

    print(i es impar)

  • for i in range (1,11):

    if i%2==0:

    print(i," es par")

    else:

    print(i," es impar")

Explanation

Question 18 of 20

2

Si quiero imprimir un nombre 10 veces, utilizando el ciclo while en python. ¿Que código utilizo?

Select one of the following:

  • nombre=input("Dame un nombre")

    i=1

    while i<=10:

    print (nombre)

    i=i+1

  • nombre=input("Dame un nombre")

    i=1

    while i<=10:

    print (nombre)

    i=i+1;

  • nombre=input("Dame un nombre")

    i=1

    while i<=10:

    print ("nombre")

    i=i+1

  • nombre=input("Dame un nombre")

    i=1

    while i<=10

    print (nombre)

    i=i+1

Explanation

Question 19 of 20

2

¿Que realiza el siguiente código?
i=1

while i<=10:

print(i)

i=i+1

Select one of the following:

  • Imprime los pares de 1 a 10

  • Imprime los impres de 1 a 10

  • Imprime los numero de 1 a 10

  • imprime la suma de los numeros de 1 a 10

Explanation

Question 20 of 20

2

Si quiero imprimir los numero pares de 1 hasta 10, utilizando el ciclo while. ¿Que codigo utilizo?

Select one of the following:

  • i=1

    while i<=10:

    if i%2==0:

    print(i," es par")

    else

    print(i," es impar")

    i=i++1

  • i=1

    while i<=10

    if i%2==0:

    print(i," es par")

    else:

    print(i," es impar")

    i=i+1

  • i=1

    while i<=10:

    if i MOD 2==0:

    print(i," es par")

    else:

    print(i," es impar")

    i=i+1

  • i=1

    while i<=10:

    if i%2==0:

    print(i," es par")

    else:

    print(i," es impar")

    i=i+1

Explanation