Jonathan Vg
Quiz by , created more than 1 year ago

5 preguntas de python

2328
0
0
Jonathan Vg
Created by Jonathan Vg over 8 years ago
Close

test python

Question 1 of 5

1

El resultado de la declaración print('%.2f' % 1714.666) es

Select one of the following:

  • 1714.0

  • 1714.67

  • 1715

  • 1714.66

Explanation

Question 2 of 5

1

Una forma de añadir un punto de interrupción dentro del código es

Select one of the following:

  • import pdb; pdb.setBreakpoint()

  • import pdb; debug

  • import pdb; debugger

  • import pdb; pdb.set_trace()

Explanation

Question 3 of 5

1

Para comentar varias líneas de código, ¿cuál es la forma correcta?

Select one of the following:

  • --- comentario ---

  • ''' comentario '''

  • /* comentario */

  • ### comentario '''

Explanation

Question 4 of 5

1

Para mostrar el valor de la posición 2 de un array llamada micoleccion utilizamos

Select one of the following:

  • puts(micoleccion[2])

  • print(micoleccion[1])

  • print(micoleccion[2])

  • pp(micoleccion[2])

Explanation

Question 5 of 5

1

Para mostrar texto en la consola usamos el comando

Select one of the following:

  • p

  • console.log

  • echo

  • print

Explanation