Boolean data has two values. They are:
True and False
What is the domain (input) and range (output) of the addition function?
__ + ___
Domain: Number, Number
Range: Number
Name an example of an image.
Triangle, square, star, a sprite, etc.
Write a contract for the subtraction function
subtraction: number, number -> number
What is a constant?
A fixed number in a relationship.
When does AND return TRUE? (Hint: your answer should reference its parameters/inputs)
When both of its parameters are true
What is the range of the star function?
star(radius, style, color)
Image
What type of data is any sequence of characters between quotation marks?
String
Write a contract for the triangle function
Hint: name: domain->range
Hint 2: triangle(size, style, color)
triangle: number, string, string -> image
What is a function's range?
the type of data that a function produces (the data type of the output)
When does OR return TRUE? (Hint: your answer should reference its parameters/inputs)
When either (or both) of its parameters are true
What is the domain of the star function?
star(radius, style, color)
Number, string, string
What type of data is this:
"Hello World!"
String
What is my full name (first and last)?
Lydia Eldridge
What is a function's domain?
the type of a data that a function expects (the types of input data)
When does NOT return TRUE? (Hint: your answer should reference its parameter/input)
When its parameter is false
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
Number data has how many values?
Infinite
What value of x makes this expression return TRUE?
(x>4) and (x<7)
x=5 or x=6
Define Reverse Engineer
To extract knowledge or design information from an existing product
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)
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)
(x<5) represents what type of data?
Boolean
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.
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)