Font size
WorksheetsBoolean Test
Total questions: 125
Worksheet time: 4hrs 10mins
What could be the output
a is less than b
No output
Throw error
a is less than b
a is greater than b
No print
Show error
What could be the output
a is less than b
a is greater than b
a is less than or equal to b
a is greater than or equal to be
what could be the output
a is equal to b
a and b are not equal
a is greater than b
show error
What could be the output
a is equal to b
a and b are not equal
No output
Show error
What could be the output
False
true
a is true
error
What could be the output
No print
a is less than b and c
error
a and b are both true
no output
error
True
False
No output
error
What could be the output
Left
Right
No output
Error
What could be the output
True False True False
B
True False False False
B
False
False False False True
A
What is the value of x
50
51
No value
Error
What could be the output
Boolean value of a is True
No Output
Error
10
What could be the output
No output
10 is not divisible by either 3 or 5
10 is divisible by either 3 or 5
Error
What could be the output
No output
False
True
False
True
False
True
True
True
False
No output
Fasle
True
True
True
True
False
False
False
True
What could be the output
Fasle
True
True
False
True
True
False
False
What could be the output
No output
True
True
True
False
False
True
True
False
True
What could be the output
Error
No output
condition not met
Condition met
What could be the output
No output
True
False
Error
No output
Error
False
True
What could be the output
No output
Error
True
False
What could be the output
False
True
Error
No output
What could be the output
True
False
error
No output
What is the final value of x
5
0
3
2
what could be the output
0
No output
3
Error
Which of the following evaluates to True when
a is equal to b or when a is equal to 5?
a == b or a == 5
a = b or a = 5
a == b and a = 5
a = b and a = 5
success
End
Start
Success
End
start
what could be the output
11
-11
9
-9
What could be the output
7
5
Error
No putput
What is a Boolean Operator?
A value that contains a condition
A value that contains a number
A value that contains a string
A value that contains a boolean
Which type of Boolean checks for a specific condition?
Conditional Boolean
Comparative Boolean
Arithmetic Boolean
Logical Boolean
Zaria and Carl are making a game and to go to the next level a player must have >=1000 gold coins. The player only has 900 gold coins and cannot advance until they gather 100 more gold golds. What kind of Boolean Operator has been coded?
Comparative Boolean
Checks for a specific condition
Conditional Boolean
Logical Operations
Imagine Daniel is driving and he sees a traffic light turn red. What should Daniel do if the condition 'light=red' is true?
Stop
Go ahead
Check for peanuts
Compare values
Ethan, Scarlett, and Nora are at a traffic signal. What should they do if the signal light is not red?
Go ahead
Stop
Check for peanuts
Compare values
In what types of coding structures are Boolean Operators used?
repetition and selection
sequential
looping and repetition
sequential and repetition
What happens if the word being searched exists?
Condition is True
Condition is False
Condition is Unknown
Condition is Invalid
Cindy is programming a game that the player must find keys to be able to open doors. The player must have the "green key" to open the "green door". What happens if the condition does not exist?
Condition is False and the door does not open
Condition is True and the door opens
Condition is Unknown and the game has a logic error
Condition is Invalid because of syntax errors
What does a Comparative Boolean code look for?
A special character
it compares values
A specific string
A specific floating point
What happens if the code finds a 'Yes'?
Make the statement
Ignore the statement
Check for peanuts
Compare values
Boolean Operators are:
AND
OR
NOT
All of the above
Which Boolean operator is used to NARROW your search to include all search keywords?
AND
OR
NOT
Which operator is used in a search to EXPAND your search results?
OR
AND
NOT
Which Boolean operator is used to EXCLUDE search terms?
AND
OR
NOT
The following search will include results with cats in them: Cats AND Dogs
True
False
A(n) algorithm is:
Values that a program provides to a function or subroutine
Way to manage complexity, hide details or remove duplication
Type of code to perform a math operation, such as + - * /
A set of steps to accomplish a task.
A(n) argument is:
Way to manage complexity, hide details or remove duplication
A set of steps to accomplish a task.
Values that a program provides to a function or subroutine
Type of code to perform a math operation, such as + - * /
A(n) arithmetic operator is:
Values that a program provides to a function or subroutine
Type of code to perform a math operation, such as + - * /
A set of steps to accomplish a task.
Way to manage complexity, hide details or remove duplication
A(n) relational operator is:
An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)
A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)
Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.
Control block that looks for events to then perform action
A(n) event handler is:
Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.
A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)
An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)
Control block that looks for events to then perform action
A(n) logical operator is:
An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)
Control block that looks for events to then perform action
A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)
Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.
A(n) integer is:
A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)
A precise number by including values after the decimal place
A whole number, it does not have any digits after a decimal.
A data type that can have only 2 values - TRUE or FALSE
A(n) conditional statement is:
A precise number by including values after the decimal place
A data type that can have only 2 values - TRUE or FALSE
A whole number, it does not have any digits after a decimal.
A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)
A(n) string is:
An object such as a number or word. A _____ is an expression that cannot be evaluated any further. Variables are evaluated to a final ____ before operators (arithmetic, relational, or logical) are then used on them.
An action (such as clicking a button) or occurrence (receiving a text message) that happens during runtime that will trigger a response or behavior by the software.
The smallest unit of data storage that a program can use.
A type of variable that holds text (characters, numbers, punctuation or math symbols). Uses quotes to tell the computer to not treat what is inside the string (inside the quotes) as code.
A(n) value is:
A type of variable that holds text (characters, numbers, punctuation or math symbols). Uses quotes to tell the computer to not treat what is inside the string (inside the quotes) as code.
An object such as a number or word. A _____ is an expression that cannot be evaluated any further. Variables are evaluated to a final ____ before operators (arithmetic, relational, or logical) are then used on them.
An action (such as clicking a button) or occurrence (receiving a text message) that happens during runtime that will trigger a response or behavior by the software.
The smallest unit of data storage that a program can use.
A(n) variable is:
An action (such as clicking a button) or occurrence (receiving a text message) that happens during runtime that will trigger a response or behavior by the software.
An object such as a number or word. A _____ is an expression that cannot be evaluated any further. Variables are evaluated to a final ____ before operators (arithmetic, relational, or logical) are then used on them.
A type of variable that holds text (characters, numbers, punctuation or math symbols). Uses quotes to tell the computer to not treat what is inside the string (inside the quotes) as code.
The smallest unit of data storage that a program can use.
Which Event Handler will update the Screen to show the picture taken on the Canvas?
Camera 1
Camera 2
Camera 3
Camera 4
If "AngryBird.X > HappyPig.X" is TRUE and "AngryBird.Y > HappyPig.Y" is FALSE, what color will be chosen?
Purple
Green
Orange
Yellow
If AngryBird.X = 10, AngryBird.Y = 10 and HappyPig.X = 30, HappyPig.Y = 30, what color will be chosen?
Purple
Green
Orange
Yellow
If AngryBird.X = 50, AngryBird.Y = 50 and HappyPig.X = 30, HappyPig.Y = 30, what color will be chosen?
Purple
Green
Orange
Yellow
"when slider1.position changed" is an example of:
an event handler
a logical operator
a float
an integer
"message", "title", "button1Text" are all examples of:
abstraction
arguments
booleans
events
In the picture, "HappyImage.Y < Canvas1.Height * 0.1" is an example of:
a boolean expression
an event
arguments
an abstraction
In the picture, OR is an example of:
a logical operator
an argument
a float
a string
In the picture, the x in "Canvas1.Height x 0.1" is:
a relational operator
a logical operator
an arithmetic operator
a string
Match the following Boolean operators with their function in search queries.
AND
Used to narrow your search; results must include both terms; gives fewer search results
OR
Used to broaden your search; results can include either term; gives more search results
NOT
Used to exclude terms from your search; results do not include the term following NOT
Combine Boolean or numeric values and returns of the same data type as the values.
comparison/relational operators
arithmetic operators
logical operators
bus operators
Evaluate:
18 > 4 and 18 < 20
True
False
Which of the following are boolean operators ? ( SELECT MULTIPLE ANSWERS)
AND
YES
NIL
OR
What is a boolean expression? Select ALL correct answers.
A statement that evaluates to True and False.
A statement that evaluates to ON and OFF.
A statement that evaluates to Yes and No.
A statement that evaluates to True, False and anything in between.
The Logic Gate that gives an output of 1 when either input is 1, is called a
NOT
OR
AND
The Logic Gate that gives an output of 1 when BOTH inputs are 1 ONLY, is called a
NOT
OR
AND
Evaluate the following boolean expression:
4 > 2
YES
NO
A Boolean Expression is (a)
Why is using OR important when searching two main words?
It will show both options
It will show one of the words you want
It will pick one of the words to show
If I write AND in-between two words what will happen?
Both words will form together
Both words will show up
The words combined/together will show up
What is a Boolean Operator?
A value that contains a condition
A value that contains a number
A value that contains a string
A value that contains a boolean
Which type of Boolean checks for a specific condition?
Conditional Boolean
Comparative Boolean
Arithmetic Boolean
Logical Boolean
Zaria and Carl are making a game and to go to the next level a player must have >=1000 gold coins. The player only has 900 gold coins and cannot advance until they gather 100 more gold golds. What kind of Boolean Operator has been coded?
Comparative Boolean
Checks for a specific condition
Conditional Boolean
Logical Operations
Imagine Daniel is driving and he sees a traffic light turn red. What should Daniel do if the condition 'light=red' is true?
Stop
Go ahead
Check for peanuts
Compare values
Ethan, Scarlett, and Nora are at a traffic signal. What should they do if the signal light is not red?
Go ahead
Stop
Check for peanuts
Compare values
In what types of coding structures are Boolean Operators used?
repetition and selection
sequential
looping and repetition
sequential and repetition
What happens if the word being searched exists?
Condition is True
Condition is False
Condition is Unknown
Condition is Invalid
Cindy is programming a game that the player must find keys to be able to open doors. The player must have the "green key" to open the "green door". What happens if the condition does not exist?
Condition is False and the door does not open
Condition is True and the door opens
Condition is Unknown and the game has a logic error
Condition is Invalid because of syntax errors
What does a Comparative Boolean code look for?
A special character
it compares values
A specific string
A specific floating point
What happens if the code finds a 'Yes'?
Make the statement
Ignore the statement
Check for peanuts
Compare values
When searching in a database or on the Internet, the first results you get are the best results. True or false?
True
False
Boolean operators help you ________ when searching for information. Which answer is WRONG?
Narrow your search results
Broaden your search results
Get the most recent search results
Be in control of your search results
List the three Boolean operators that act as commands in a search.
AND
BUT
NOT
OR
Which Boolean operator should you use between two keywords when you want to NARROW, or focus, your search results? Mark all that are correct.
AND
BUT
NOT
OR
Which Boolean operator should you use between two keywords when you want to BROADEN, or get more, search results?
AND
BUT
NOT
OR
Which Boolean operator should you use to eliminate search results that contain a specific keyword?
AND
BUT
NOT
OR
What symbol does the search engine Google use in place of the NOT operator?
hashtag (#)
minus sign (-)
plus sign (+)
slash sign (/)
When you use a Boolean operator between two keywords, that is called a search string. What search string would you use to get the search results shown in GREEN in the image below?
pigs AND chickens
I want search results about pigs, BUT I don’t want results about chickens.
pigs NOT chickens
pigs OR chickens
Let’s say you do this keyword search: cougar. Then you do this search instead: cougar OR puma. Why did you get more search results when you added the Boolean operator -- OR with an additional keyword?
Puma is different than cougar, and you told the computer to omit articles with the word puma in them.
Puma is another word for cougar, and you told the computer to find articles with the word cougar, the word puma, or both words.
Puma is another word for cougar, and you told the computer to only search for puma.
Actually, your results will be the same with both searches because the two keywords mean the same thing.
What does the Boolean operator AND do in a search?
Combines search terms randomly
Excludes specific search terms
Broadens the search results
Narrows the search results
How does using the Boolean operator OR help in a search?
Combines search terms randomly
Excludes specific search terms
Broadens the search results
Narrows the search results
What is the purpose of the Boolean operator NOT in a search?
Narrows the search results
Broadens the search results
Excludes specific search terms
Combines search terms randomly
Which Boolean operator is used to broaden search results?
NAND
NOT
OR
AND
How does using the Boolean operator NOT help in a search?
Combines search terms randomly
Excludes specific search terms
Broadens the search results
Narrows the search results
What happens when you combine the Boolean operator AND with two search terms?
Results include either term
Results include both terms
Results exclude one term
Results are random
What would be the results of this search?
Italy NOT (Politics OR Sports)
All information about Italy.
Information about politics or sports in all countries other than Italy.
Information about Italy, excluding politics and sports.
Information about Italy and sports, but not politics.
What would be the results of this search?
(wind power OR alternative energy OR solar power) AND global warming
Information about global warming that must also include at least one of the phrases in parentheses
Information about global warming that cannot include any of the phrases in parentheses
Information about global warming that includes all of the phrases in parentheses
Information about global warming or about any of the phrases in parentheses
What would be the result of this search?
(Man OR Men) AND Fitness
Anything having to do with fitness.
Articles about an individual man or men, and articles about fitness.
Articles about fitness that are specifically related to a man or men.
Articles about fitness for either a man or for men, but not both.
What would be the result of this search?
(Man OR Men) AND (Fitness NOT Yoga)
Articles about a man's or men's fitness, not including articles that include yoga.
Articles about an individual man or men, and articles about fitness.
Articles about men, excluding articles about fitness and yoga.
Articles about fitness for either a man or for men, and articles about yoga.
Using the Boolean Operator AND will broaden your results and produce more hits.
True
False
Using the Boolean Operator OR in a search will broaden your results and produce more hits.
True
False
Using the Boolean Operator NOT will narrow your research and limit your number of hits.
True
False
What would be the results of this search?
Italy NOT (Politics OR Sports)
All information about Italy.
Information about politics or sports in all countries other than Italy.
Information about Italy, excluding politics and sports.
Information about Italy and sports, but not politics.
What is the output?
more than 7
more than 23
spam
7
Pieces of code that only run "under certain conditions":
conditional statements
control flow statments
syntax
variables
What is the output?
True
False
condition1
condition2
What does the boolean operator "AND" help us do?
add more key words
seperate two key words
narrow your search between one or two items
To limit your search you would use which Boolean Operator?
and
not
or
Which boolean operator would you use to elminate unimportant information?
not
and
or
