Variables/Syntax
PixelPad
Arrays/Dictionaries
Loops/Conditions
Functions
100

Sets the variable myValue to twice otherValue.

What is myValue = otherValue * 2?

100

This is a term used in game development for an image that appears in your game.

What is sprite?

100

A type of object that stores values inside of keys.

What is dictionary?

100

An if statement inside of a loop would have its contents indented this many times.

What is 2?

100

This keyword is used for defining functions.

What is def.

200

If myValue = "1", this would be the result of myValue*3.

What is 111?

200

Set the sprite of an object to "spr_mysprite".

What is sprite = sprite_new("spr_mysprite")

200

A declaration of an array with one element: the number 1.

What is [1]?

200

The opposite of True.

What is False?

200

The declaration of a function is similair to loops and conditionals, because it is followed by this character.

What is colon.

300

The result of print("W\nh\ne\ne\ne")

What is:

W

h

e

e

e

300

The size of the PixelPad canvas.

What is 640x480.
300

Array indices (the plural of index) are integers (whole numbers), but dictionary keys are this.

What are strings?

300

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?

300

The word used to describe the variables that are inputs to the function.

What are arguments?

400

This will set myValue to 3 to the power of myPower.

What is myValue = 3**myPower

400

The built in variable that will always represent the current instance of an object.

What is self?

400

Declares a dictionary myDict with an empty array in the key "myArray".

What is myDict = {"myArray": []}

400

The value of:

(myValue == 3) or (not myValue is 3)

What is True

400

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"):

500
The result of chr(ord(chr(ord("A") + 1)) - 1)

What is "A".

500

The way to access a variable "myValue" belonging to the game script from an object script.

What is game.myValue?

500

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]?

500

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

500

What would be the result of print(mystery(mystery(mystery(mystery(1)))))

if...

def mystery(x):

return x*2

What is 16?