Zusammenfassung der Ressource
Frage 1
Frage
If trying to import a command-line argument when none was entered ("something = sys.argv[1]"), the error produced will be:
Antworten
-
NameError
-
SyntaxError
-
IndexError
Frage 2
Frage
If trying to import a command-line argument when "import sys" hasn't been entered, the error produced will be:
Antworten
-
NameError
-
SyntaxError
-
IndexError
Frage 3
Frage
When running “python3 working.py 12.8”, sys.argv[1] is which of the following?
Frage 4
Frage
What will be the output of the following code: x = 3 y = x x = 5 print(y)
Antworten
-
3
-
5
-
an Error of some sort
-
y
Frage 5
Frage
What will be the output of the following code: x = 3 y = x x = 5 print('y')
Antworten
-
3
-
5
-
An Error of some sort
-
y