Data Types
Pygame
Selection
Commands
Vocabulary
100

This data type represents sequences of characters.  

What is string?

100

This built-in function is automatically called to update the screen each frame (60 times per second).


What is draw()?

100

The comparison operator to check for equality.

What is ==?

100

Command that would allow you to take in a price from the user (like 1.50 for a donut)

(answers may vary)

What is price = float(input("What is the price of a donut?")

100

The name of the input a function will receive.

Ex: numSides is the ______ in 

polygon(numSides)

What is parameter?

200

This data type is used for whole numbers and their opposites. 

What is integer?

200

This function is triggered automatically when the mouse is clicked.

What is on_mouse_down(pos)?

200

The comparison operator to check for inequality (not equal).

What is !=?

200

If "score" tracks the number of correct answers out of 40 questions, this expression would calculate the percentage correct.

score/40 * 100

200

The specific value of a parameter.  

Ex: The value 5 is the ____for numSides

polygon(numSides) --> polygon(5)

What is argument?

300

This data type is used for fractional (decimal) values. 

What is float?

300

This line must be included at the end of every Pygame Zero file to run it properly.

What is pgzrun.go()?

300

"Else if" in Python.

What is elif?


300

Assuming "import math", this expression in python:

sqrt(b^2 - 4 ac

What is math.sqrt(b**2 - 4 *a*c)?

300

The operation that gives the remainder of a division problem.

What is modulus?

400

This data type has only two values, True or False.

What is Boolean?

400

This command sets an image named "poodle.png" as a sprite like character stored in the variable dog

dog = Actor("poodle")

400

The syntax error in this code:

if score > 64 

    print("You passed")

else

    print("You failed")

What is a missing colon? 

:


400

It’s midnight. This expression gives the military time 175 hours later.

175%24

400
What IDE stands for in CS.

What is integrated development environment?

500

This Python data type is used to handle imaginary numbers, in the form "a + bj"

Note: Python uses j instead of i to represent the imaginary unit.

What is complex?

500

Assuming an 800×600 screen, this conditional moves a dog actor back to the left side once it crosses the right edge.

if dog.x > 800:

        dog.x = 0

500

Condition to check if a string stored in a variable "guess" is NOT an empty string.

What is 

if guess != "":

500

Complete the missing expression to print if a variable called "number" holds an even number.

if ______________:

    print(number + " is even.")

else:

    print(number + " is odd.")

What is 

number%2 == 0

 ?

500

The fancy word for joining strings with calculations or values held in variables

What is concatenation?