0% found this document useful (0 votes)
95 views

Mis Cursos Quizzes

The document summarizes a student's attempt on a quiz about Python, IPython, Google Colab, and basic data types in Python, C/C++ and JavaScript. The student answered 11 questions correctly and 1 question incorrectly, earning a score of 7.40 out of 12 and a grade of 62%. The quiz contained multiple choice questions testing knowledge of Python list operations, data types, numerical representations, loops, and using libraries like NumPy, Pandas and Matplotlib.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Mis Cursos Quizzes

The document summarizes a student's attempt on a quiz about Python, IPython, Google Colab, and basic data types in Python, C/C++ and JavaScript. The student answered 11 questions correctly and 1 question incorrectly, earning a score of 7.40 out of 12 and a grade of 62%. The quiz contained multiple choice questions testing knowledge of Python list operations, data types, numerical representations, loops, and using libraries like NumPy, Pandas and Matplotlib.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del

ript: Revisión del intento

Área personal / Mis cursos / bog-2016696-1-2021-01 / Quizzes

/ Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript

Comenzado el lunes, 15 de marzo de 2021, 11:11


Estado Finalizado
Finalizado en lunes, 15 de marzo de 2021, 11:47
Tiempo 36 minutos 17 segundos
empleado
Puntos 7,40/12,00
Calificación 3,08 de 5,00 (62%)

Pregunta 1
Correcta

Puntúa 1,00 sobre 1,00

What does the following Python code:

x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
y = x[::-1]
print(y)

Seleccione una:
a. [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] 

b. 1 2 3 4 5

c.  [1, 2, 3, 4, 5, 6, 7, 8, 9]

d. a e i o u

e. [1, 2, 3, 4, 5, 4, 3, 2, 1]

La respuesta correcta es: [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 1/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 2

Correcta

Puntúa 1,00 sobre 1,00

What does the following Python code: print(type(2e1))

Seleccione una:
a. <class 'float'> 
b. <class 'int'>

c. 14.0

d. 20

e. 15.0

La respuesta correcta es: <class 'float'>

Pregunta 3
Correcta

Puntúa 1,00 sobre 1,00

Among the different ideas that have allowed the advance of computer hardware and software , one very important is the use of
different numerical systems for representing values, being the most famous the binary, hexadecimal, octal and decimal
representations.
Running the following Python 3 block of code has as result:

x=0o3701
print(x)

Seleccione una:
a. 1985 

b. Exception Thrown --> Stack Trace: base 8 var printing not allowed as non String

c. -1
d. 0o3701

La respuesta correcta es: 1985

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 2/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 4

Correcta

Puntúa 1,00 sobre 1,00

Conceptually, what does running the line print(bin(10)) using a Python 3 enviroment do?

Seleccione una:
a. It accesses a registry in RAM called “bin” and stores there the decimal value 10. Exceptions are printed if syntax is wrong.
b. It reads “10” as a binary chain, then this chain is converted to a decimal value and printed.
c. No operation is done, an exception is thrown because Python 3 does not include any bin command or operator.
d. It gets a binary representation for the decimal 10 and then prints it. 

La respuesta correcta es: It gets a binary representation for the decimal 10 and then prints it.

Pregunta 5

Incorrecta

Puntúa -0,20 sobre 1,00

How many times will the while loop of the following Python code be executed?:
ini = 0
fin = 128
x = 100
while(ini != x):
  
  mid = int ( (ini + fin + 1)/2 )
  
  if( mid < x):
    fin = mid - 1
  else:
    ini = mid

Seleccione una:
a. It never Ends

b. 2

c. 0 

d. 7

e. 1

La respuesta correcta es: It never Ends

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 3/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 6

Incorrecta

Puntúa -0,20 sobre 1,00

What does the following  C++ code segment prints?

int a = 5;
int b = 3;

float c = a/b;
cout<< c << '\n';

Seleccione una:
a. -1757895751

b. 1

c. 121

d. y

e. Error 

La respuesta correcta es: 1

Pregunta 7
Incorrecta

Puntúa -0,20 sobre 1,00

What does the following C++ code segment prints?

set <int> s;
for(int i = 0; i < 10; i++){

    s.insert(i%5);
}
cout<<s.size()<<endl;

Seleccione una:
a. 2

b. 5

c. 1

d. 10 

e. 11

La respuesta correcta es: 5

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 4/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 8

Incorrecta

Puntúa 0,00 sobre 1,00

What is the value of the variable foo in the following Javascript code segment?

//ASCII value (charCode) for 'B' is 66


//ASCII value (charCode) for 'C' is 67

//ASCII value (charCode) for '1' is 49


var obj = {
    name: 'B',

    lastname: 'C',
    age: 66,
    course: 'B1',

    money: 1.375
}

var foo = String.fromCharCode(obj.age / obj.money + 1);

Seleccione una:
a. 67

b. 66

c. B1

d. NaN 

e. 1

La respuesta correcta es: 1

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 5/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 9

Correcta

Puntúa 1,00 sobre 1,00

What is the final value of the variable foo in the following Javascript code segment?
var foo = 0;

for(i = 0; i <= 11; i+=1){


    foo += i;

Seleccione una:
a. 66 

b. 55

c. 0

d. 45

e. 100

La respuesta correcta es: 66

Pregunta 10
Correcta

Puntúa 1,00 sobre 1,00

What does the following Python code, with the help of Numpy, segment prints?

b = numpy.linspace(0,360,5)
print(b/90)

Seleccione una:
a. [ 1 1 9 64 25]

b. [-4. -2. 0. 2. 4.]

c. [-4. -3. -2. -1. 0.]

d. [ 2 2 6 16 10]

e. [0. 1. 2. 3. 4.] 

La respuesta correcta es: [0. 1. 2. 3. 4.]

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 6/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 11

Correcta

Puntúa 1,00 sobre 1,00

With that dataframe from Pandas called "data", what is the result of the following Python segment code

data.apply(lambda x: x.min() - x.max())

Seleccione una:
a. A    27

B    41
C    35
D    33

b. A    14

B    -1
C  6

D    -3

c. 
A   -27
B   -41

C   -35
D   -33

d. A    41

B    40
C    41
D    30

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 7/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento
e. A   -41
B   -40

C   -41
D   -30

La respuesta correcta es:


A   -27

B   -41
C   -35

D   -33

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 8/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

Pregunta 12

Correcta

Puntúa 1,00 sobre 1,00

What does the following Python code segment prints? (plt here is the name to use pyplot from Matplotlib)
names = ['group_a', 'group_b', 'group_c']

values = [1, 10, 100]
 

plt.plot(names, values)
plt.suptitle('Categorical Plotting')
plt.show()

Seleccione una:
a.

b.

c.

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 9/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

d.

e. 

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 10/11
14/4/2021 Quiz 2 -Python, Ipython, Google Colab, Basic Data Types: Python, C/C++ and JavaScript: Revisión del intento

La respuesta correcta es:

◄ Quiz 1 - Python Web and Internet Development Ecosystem

Ir a...

Quiz 3 - CS50x Puzzle Day – Harvard ►

https://campus.virtual.unal.edu.co/mod/quiz/review.php?attempt=1319740&cmid=624631 11/11

You might also like