Input & Output
Graphics
Boolean Logic
Unit 3 Stuff
Wild Card
100

A function that retrieves an integer from the user

readInt()

100

Code that draws cir1 on the canvas

add(cir1);

100

An operation that's true when both of its booleans are true

and &&

100

Randomizer.nextBoolean() generates this many possible values

2

100

Use this when we want to repeat an action a definite amount of times

for loop

200

The three ways you can print text to a console without expecting any input

print, println, console.log

200

The default size of the canvas

400x600

200

An operation that's true if its corresponding boolean is false

Not !

200

Generates a random number from 5 to 15, inclusive

Randomizer.nextInt(5, 15)

200

Karel turns until they face south

While(notFacingSouth()){

    turnLeft();

}

300

Mouse events use this variable to represent your cursor

e

300

When making a new Circle object, this is your single argument.

radius

300

The boolean order of operations

Parentheses (), not !, and &&, or ||

300

When two pieces of code have the same outcome, regardless of input

Equivalence

300

The term for when a loop is inside of another loop

Nested loop

400

How many stars does this print?

for(let i = 7; i < 5; i++){

    print("***");
}

0

400

When making a new Rectangle object, these two values are used as your arguments.

Width and height

400

Simplify a || !a

true

400

Immediately halts the loop that it's inside

break

400

Function that runs automatically

start()

500

Write code that asks the user for a number. Print "yes" if that number has one or two digits.

let x = readInt("gimme a number");

if(x > -100 && x < 100){

    print("yes");

}

500

The coordinates for the center of any canvas

(getWidth() / 2, getHeight() / 2)

500

!(a && b) is equivalent to this

!a || !b

500

Can generate 10, 20, 30, 40, or 50 at random

Randomizer.nextInt(1, 5) * 10

500

Final AP Exam registration day

November 13