Sets the variable myValue to twice otherValue.
What is myValue = otherValue * 2?
This is a term used in game development for an image that appears in your game.
What is sprite?
A type of object that stores values inside of keys.
What is dictionary?
An if statement inside of a loop would have its contents indented this many times.
What is 2?
This keyword is used for defining functions.
What is def.
If myValue = "1", this would be the result of myValue*3.
What is 111?
Set the sprite of an object to "spr_mysprite".
What is sprite = sprite_new("spr_mysprite")
A declaration of an array with one element: the number 1.
What is [1]?
The opposite of True.
What is False?
The declaration of a function is similair to loops and conditionals, because it is followed by this character.
What is colon.
The result of print("W\nh\ne\ne\ne")
What is:
W
h
e
e
e
The size of the PixelPad canvas.
Array indices (the plural of index) are integers (whole numbers), but dictionary keys are this.
What are strings?
How many times will myFunction be called:
array = [1, 2, 3, 4, 5]
val = 0
while (val < 5):
for e in array:
myfunction()
# The next line is not in the for,
# but it is in the while.
val += 1
What is 25?
The word used to describe the variables that are inputs to the function.
What are arguments?
This will set myValue to 3 to the power of myPower.
What is myValue = 3**myPower
The built in variable that will always represent the current instance of an object.
What is self?
Declares a dictionary myDict with an empty array in the key "myArray".
What is myDict = {"myArray": []}
The value of:
(myValue == 3) or (not myValue is 3)
What is True
Take the function defined below:
def printHello(name):
...
This is how you could have the name variable be "John Doe" if you called the function like printHello().
What is def printHello(name="John Doe"):
What is "A".
The way to access a variable "myValue" belonging to the game script from an object script.
What is game.myValue?
Say you have an array inside of an array (yes, you can do this)? This is how you would access the element of myArray in the 2nd position (index 1) of the array at the 3rd position (index 2).
What is myArray[2][1]?
What would be the result printed by the following loop (everything is in the while).
x = 0
while (x < 30):
if (x % 9 == 1):
print(x)
#The next line is not in the if.
x += 1
What is:
1
10
19
28
What would be the result of print(mystery(mystery(mystery(mystery(1)))))
if...
def mystery(x):
return x*2
What is 16?