a statement that is executed when the condition in the if statement is not met
What is else statement
instead of using { to show the start and end of our code you do this to not get a bad input error
what is tab over
You use this type of loop in the main program of the game
what is a while loop
This is short for else if
what is elif
These are the 5 ports on a raspberrpi
What are GPIO pins, USBs, HDMI, RCA(audio port), Power(USB-C)
a statement that tells the interpreter what to do if the condition is met.
You need this at the end of of every beginning block of code in order for it to run
what is a colon :
You use this code in order to increase your score by 1 or more than one if you change 1 number
What is score = score + 1
This is short for random integer
randint
This is also displayed as (255,255,0)
What is Yellow
A reserved memory location to store values
DAILY DOUBLE
Whats the error?
sense.stick.direction_any = draw astronaut
You need these functions in order to run the game successfully. Name 3
flatten, gen_pipes, move_pipes, draw_astronaut, check_collision,
You use two of these to denote that the variable is exactly equal to the comparator
what is ==
What is temperature, pressure, humidity, magnetic field, acceleration and gyroscope, distance, and motion
The keyword for defining a function in Python
what is def
You need this which tells the computer where to place a new red pixel
def move_pipes(matrix):
for row in matrix:
for i in range(7):
row[1] = row[i + 1]
what is row[i] or i
You use these two words which are highlighted purple in your emulator to create a for loop
what are for and in
This is another short way besides writing 7, of writing the last index in a list.
what is -1
You move this way because of the code displayed
Y += 1
What is down
a value that a function returns to the calling script or function when it completes its task
what is return
these two words missing at the end of the gen_pipes function display this error when run.
TypeError: 'NoneType' does not support indexing on line 62 in main.py
what is return matrix
You need the word (matrix) at the end of every function accept in the draw_astronaut function you use this.
what is (event)
This is a shorten way of writing this
matrix = flatten(matrix)
sense.set_pixels(matrix)
what is sense.set_pixels(flatten(matrix))
This is another computer science term for a list
what is an array