GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

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

Michael Jardine 5 Fragen

Quiz starten

Fragen in diesem Quiz (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

Informationen

Beschreibung
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
Sprache
English
Aufrufe
78
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck