Boolean Logic
Functions
Data and Data Types
Misc.
Definitions
100

Boolean data has two values. They are:

True and False

100

What is the domain (input) and range (output) of the addition function?

__ + ___

Domain: Number, Number

Range: Number

100

Name an example of an image.

Triangle, square, star, a sprite, etc. 

100

Write a contract for the subtraction function

subtraction: number, number -> number

100

What is a constant?

A fixed number in a relationship.

200

When does AND return TRUE? (Hint: your answer should reference its parameters/inputs)

When both of its parameters are true

200

What is the range of the star function?

star(radius, style, color)

Image

200

What type of data is any sequence of characters between quotation marks?

String

200

Write a contract for the triangle function

Hint: name: domain->range 

Hint 2: triangle(size, style, color)

triangle: number, string, string -> image

200

What is a function's range?

the type of data that a function produces (the data type of the output)

300

When does OR return TRUE? (Hint: your answer should reference its parameters/inputs)

When either (or both) of its parameters are true

300

What is the domain of the star function?

star(radius, style, color)

Number, string, string

300

What type of data is this:

"Hello World!"

String

300

What is my full name (first and last)?

Lydia Eldridge

300

What is a function's domain?

the type of a data that a function expects (the types of input data)

400

When does NOT return TRUE? (Hint: your answer should reference its parameter/input)

When its parameter is false

400

Write the contact for a function ’polka dot’, that takes in a color and produces an outlined circle of radius 25, filled in with that color.

(Example-- Name: domain->range)

polka dot: string->image

400

Number data has how many values?

Infinite

400

What value of x makes this expression return TRUE?

(x>4) and (x<7)

x=5 or x=6

400

Define Reverse Engineer

To extract knowledge or design information from an existing product

500

What value of y makes this expression return FALSE?

(y<9) or (y>4)


y = 8, y=7, y=6, y=5 (any of those is correct)

500

Define a function ’polka dot’, that takes in a color and produces an outlined circle of radius 25, filled in with that color.

Hint: name(input) = circle(radius, style, color)

polka dot (color) = circle (25, outline, color)

500

(x<5) represents what type of data?

Boolean

500

What's the difference between a dependent variable and an independent variable?

The independent variable (which is the input) is controlled by the experimenter. The dependent variable (the output) changes based on the independent variable.

500

What is a variable?

a value that can change, depending on conditions or on information passed to the program (a container for a value or expression that can be used repeatedly throughout a program)