Zusammenfassung der Ressource
Frage 1
Frage
Variables: How do you form a variable?
Antworten
-
variable_name = ("variable_content")
-
variable_name = ["variable_content"]
-
variable_name = {"variable_content"}
-
variable_name = "variable_content"
Frage 2
Frage
If statements: What follows an if statement?
Antworten
-
A colon :
-
An equals =
-
A semi-colon ;
Frage 3
Frage
If statements: what are the other statements?
Antworten
-
Elseif and Else
-
Elif and Else
Frage 4
Frage
Loops: How do you form a while loop?
Antworten
-
while 'X' then:
-
while 'X':
Frage 5
Frage
Loops: What will this 'for loop' do?: for i in range(5):
Antworten
-
repeat the number five forever
-
repeat something five times
-
repeat five things, five times
Frage 6
Frage
String indexing: print(word[3]), what will happen?
Antworten
-
it will print word three times
-
it will print the third letter in word
-
it will print the third item in the list: word
-
it will print the fourth letter in word
Frage 7
Frage
Lists: how do you add something to a list?
Antworten
-
list_name.add(value)
-
list_name.input(value)
-
append(value).list_name
-
list_name.append(value)
Frage 8
Frage
Functions: How do you form a user defined function?
Frage 9
Frage
Text Files: How do you open and close a reading text file?
Antworten
-
file_name.open("X.txt", "r")
-
file_name.open("X.txt", "r+")
-
file_name.open("X.txt", "w")
-
file_name.open("X.txt", "a")
Frage 10
Frage
Procedures: What does a procedure lack as opposed to a User Defined Function
Antworten
-
return X
-
def procedure_name():