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