¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

INFO L04 (w02-2) - Expressions and command-line Arguments

Michael Jardine 5 preguntas

Hacer el test

Preguntas del test (5)

  1. 1If trying to import a command-line argument when none was entered ("something = sys.argv[1]"), the error produced will be:
    1. ANameError
    2. BSyntaxError
    3. CIndexError
  2. 2If trying to import a command-line argument when "import sys" hasn't been entered, the error produced will be:
    1. ANameError
    2. BSyntaxError
    3. CIndexError
  3. 3When running “python3 working.py 12.8”, sys.argv[1] is which of the following?
    1. A"12.8"
    2. B"working.py"
    3. C12.8
  4. 4What will be the output of the following code: x = 3 y = x x = 5 print(y)
    1. A3
    2. B5
    3. Can Error of some sort
    4. Dy
  5. 5What will be the output of the following code: x = 3 y = x x = 5 print('y')
    1. A3
    2. B5
    3. CAn Error of some sort
    4. Dy

Información

Descripción
Week 02: Variables, Expressions Lecture 04: Expressions and command-line arguments - Using the command-line: getting information in to your program - Expressions: how to do calculations
Idioma
English
Visitas
78
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?