wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Boolean Test

Total questions: 125

Worksheet time: 4hrs 10mins

Name
Class
Date
1.

What could be the output

a)

a is less than b

b)

No output

c)

Throw error

2.
a)

a is less than b

b)

a is greater than b

c)

No print

d)

Show error

3.

What could be the output

a)

a is less than b

b)

a is greater than b

c)

a is less than or equal to b

d)

a is greater than or equal to be

4.

what could be the output

a)

a is equal to b

b)

a and b are not equal

c)

a is greater than b

d)

show error

5.

What could be the output

a)

a is equal to b

b)

a and b are not equal

c)

No output

d)

Show error

6.

What could be the output

a)

False

b)

true

c)

a is true

d)

error

7.

What could be the output

a)

No print

b)

a is less than b and c

c)

error

8.
a)

a and b are both true

b)

no output

c)

error

9.
a)

True

b)

False

c)

No output

d)

error

10.

What could be the output

a)

Left

b)

Right

c)

No output

d)

Error

11.

What could be the output

a)

True False True False

B

b)

True False False False

B

c)

False

d)

False False False True

A

12.

What is the value of x

a)

50

b)

51

c)

No value

d)

Error

13.

What could be the output

a)

Boolean value of a is True

b)

No Output

c)

Error

d)

10

14.

What could be the output

a)

No output

b)

10 is not divisible by either 3 or 5

c)

10 is divisible by either 3 or 5

d)

Error

15.

What could be the output

a)

No output

b)

False

True

False

c)

True

False

True

d)

True

True

False

16.
a)

No output

b)

Fasle

True

True

c)

True

True

False

d)

False

False

True

17.

What could be the output

a)

Fasle

True

b)

True

False

c)

True

True

d)

False

False

18.

What could be the output

a)

No output

b)

True

True

True

c)

False

False

True

d)

True

False

True

19.

What could be the output

a)

Error

b)

No output

c)

condition not met

d)

Condition met

20.

What could be the output

a)

No output

b)

True

c)

False

d)

Error

21.
a)

No output

b)

Error

c)

False

d)

True

22.

What could be the output

a)

No output

b)

Error

c)

True

d)

False

23.

What could be the output

a)

False

b)

True

c)

Error

d)

No output

24.

What could be the output

a)

True

b)

False

c)

error

d)

No output

25.

What is the final value of x

a)

5

b)

0

c)

3

d)

2

26.

what could be the output

a)

0

b)

No output

c)

3

d)

Error

27.

Which of the following evaluates to True when

a is equal to b or when a is equal to 5?

a)

a == b or a == 5

b)

a = b or a = 5

c)

a == b and a = 5

d)

a = b and a = 5

28.
a)

success

b)

End

c)

Start

Success

End

d)

start

29.

what could be the output

a)

11

b)

-11

c)

9

d)

-9

30.

What could be the output

a)

7

b)

5

c)

Error

d)

No putput

31.

What is a Boolean Operator?

a)

A value that contains a condition

b)

A value that contains a number

c)

A value that contains a string

d)

A value that contains a boolean

32.

Which type of Boolean checks for a specific condition?

a)

Conditional Boolean

b)

Comparative Boolean

c)

Arithmetic Boolean

d)

Logical Boolean

33.

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?

a)

Comparative Boolean

b)

Checks for a specific condition

c)

Conditional Boolean

d)

Logical Operations

34.

Imagine Daniel is driving and he sees a traffic light turn red. What should Daniel do if the condition 'light=red' is true?

a)

Stop

b)

Go ahead

c)

Check for peanuts

d)

Compare values

35.

Ethan, Scarlett, and Nora are at a traffic signal. What should they do if the signal light is not red?

a)

Go ahead

b)

Stop

c)

Check for peanuts

d)

Compare values

36.

In what types of coding structures are Boolean Operators used?

a)

repetition and selection

b)

sequential

c)

looping and repetition

d)

sequential and repetition

37.

What happens if the word being searched exists?

a)

Condition is True

b)

Condition is False

c)

Condition is Unknown

d)

Condition is Invalid

38.

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?

a)

Condition is False and the door does not open

b)

Condition is True and the door opens

c)

Condition is Unknown and the game has a logic error

d)

Condition is Invalid because of syntax errors

39.

What does a Comparative Boolean code look for?

a)

A special character

b)

it compares values

c)

A specific string

d)

A specific floating point

40.

What happens if the code finds a 'Yes'?

a)

Make the statement

b)

Ignore the statement

c)

Check for peanuts

d)

Compare values

41.

Boolean Operators are:

a)

AND

b)

OR

c)

NOT

d)

All of the above

42.

Which Boolean operator is used to NARROW your search to include all search keywords?

a)

AND

b)

OR

c)

NOT

43.

Which operator is used in a search to EXPAND your search results?

a)

OR

b)

AND

c)

NOT

44.

Which Boolean operator is used to EXCLUDE search terms?

a)

AND

b)

OR

c)

NOT

45.

The following search will include results with cats in them: Cats AND Dogs

a)

True

b)

False

46.
A(n) abstraction is:
a)
Way to manage complexity, hide details or remove duplication
b)
Type of code to perform a math operation, such as + - * /
c)
Values that a program provides to a function or subroutine
d)
A set of steps to accomplish a task.
47.

A(n) algorithm is:

a)

Values that a program provides to a function or subroutine

b)

Way to manage complexity, hide details or remove duplication

c)

Type of code to perform a math operation, such as + - * /

d)

A set of steps to accomplish a task.

48.

A(n) argument is:

a)

Way to manage complexity, hide details or remove duplication

b)

A set of steps to accomplish a task.

c)

Values that a program provides to a function or subroutine

d)

Type of code to perform a math operation, such as + - * /

49.

A(n) arithmetic operator is:

a)

Values that a program provides to a function or subroutine

b)

Type of code to perform a math operation, such as + - * /

c)

A set of steps to accomplish a task.

d)

Way to manage complexity, hide details or remove duplication

50.
A(n) Boolean expression is:
a)
An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)
b)
Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.
c)
Control block that looks for events to then perform action
d)
A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)
51.

A(n) relational operator is:

a)

An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)

b)

A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)

c)

Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.

d)

Control block that looks for events to then perform action

52.

A(n) event handler is:

a)

Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.

b)

A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)

c)

An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)

d)

Control block that looks for events to then perform action

53.

A(n) logical operator is:

a)

An expression that can be evaluted as TRUE or FALSE. Often used in CONDITIONAL STATEMENTS, such as IF (condition) THEN (action1) ELSE (action2)

b)

Control block that looks for events to then perform action

c)

A symbol that represents a compare action for a computer to take. Examples are: ">" (greater than), "<" (less than) and "=" (equal)

d)

Operators that are used to combine or change Boolean Expressions. The 3 standard operators are AND, OR, and NOT.

54.
A(n) float is:
a)
A precise number by including values after the decimal place
b)
A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)
c)
A data type that can have only 2 values - TRUE or FALSE
d)
A whole number, it does not have any digits after a decimal.
55.

A(n) integer is:

a)

A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)

b)

A precise number by including values after the decimal place

c)

A whole number, it does not have any digits after a decimal.

d)

A data type that can have only 2 values - TRUE or FALSE

56.
A(n) boolean is:
a)
A data type that can have only 2 values - TRUE or FALSE
b)
A whole number, it does not have any digits after a decimal.
c)
A precise number by including values after the decimal place
d)
A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)
57.

A(n) conditional statement is:

a)

A precise number by including values after the decimal place

b)

A data type that can have only 2 values - TRUE or FALSE

c)

A whole number, it does not have any digits after a decimal.

d)

A programming statement that directs control flow - it uses BOOLEAN expressions to make a choice between different paths (IF (condition) THEN (path1) ELSE (path2)

58.
A(n) event is:
a)
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.
b)
The smallest unit of data storage that a program can use.
c)
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.
d)
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.
59.

A(n) string is:

a)

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.

b)

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.

c)

The smallest unit of data storage that a program can use.

d)

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.

60.

A(n) value is:

a)

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.

b)

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.

c)

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.

d)

The smallest unit of data storage that a program can use.

61.

A(n) variable is:

a)

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.

b)

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.

c)

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.

d)

The smallest unit of data storage that a program can use.

62.

Which Event Handler will update the Screen to show the picture taken on the Canvas?

a)

Camera 1

b)

Camera 2

c)

Camera 3

d)

Camera 4

63.

If "AngryBird.X > HappyPig.X" is TRUE and "AngryBird.Y > HappyPig.Y" is FALSE, what color will be chosen?

a)

Purple

b)

Green

c)

Orange

d)

Yellow

64.

If AngryBird.X = 10, AngryBird.Y = 10 and HappyPig.X = 30, HappyPig.Y = 30, what color will be chosen?

a)

Purple

b)

Green

c)

Orange

d)

Yellow

65.

If AngryBird.X = 50, AngryBird.Y = 50 and HappyPig.X = 30, HappyPig.Y = 30, what color will be chosen?

a)

Purple

b)

Green

c)

Orange

d)

Yellow

66.

"when slider1.position changed" is an example of:

a)

an event handler

b)

a logical operator

c)

a float

d)

an integer

67.

"message", "title", "button1Text" are all examples of:

a)

abstraction

b)

arguments

c)

booleans

d)

events

68.

In the picture, "HappyImage.Y < Canvas1.Height * 0.1" is an example of:

a)

a boolean expression

b)

an event

c)

arguments

d)

an abstraction

69.

In the picture, OR is an example of:

a)

a logical operator

b)

an argument

c)

a float

d)

a string

70.

In the picture, the x in "Canvas1.Height x 0.1" is:

a)

a relational operator

b)

a logical operator

c)

an arithmetic operator

d)

a string

71.
Which number represents True?
a)
1
b)
5
c)
10
d)
100
72.
Which number represents False?
a)
0
b)
-1
c)
-10
d)
-100
73.

Match the following Boolean operators with their function in search queries.

a)

AND

1.

Used to narrow your search; results must include both terms; gives fewer search results

b)

OR

2.

Used to broaden your search; results can include either term; gives more search results

c)

NOT

3.

Used to exclude terms from your search; results do not include the term following NOT

74.
Used in search to expand your search; results include either or both term; gives more search results
a)
OR
b)
AND
c)
NOT
75.
Which is the best definition for Boolean Operator?
a)
Put before the name of a URL that you know to find related sites
b)
characters or a string of characters used in a search engine query to help narrow a search
c)
terms such as AND, OR, NOT that help to refine your search
d)
Used to search for an exact match of the search query
76.

Combine Boolean or numeric values and returns of the same data type as the values.

a)

comparison/relational operators

b)

arithmetic operators

c)

logical operators

d)

bus operators

77.

Evaluate:


18 > 4 and 18 < 20

a)

True

b)

False

78.

Which of the following are boolean operators ? ( SELECT MULTIPLE ANSWERS)

a)

AND

b)

YES

c)

NIL

d)

OR

79.

What is a boolean expression? Select ALL correct answers.

a)

A statement that evaluates to True and False.

b)

A statement that evaluates to ON and OFF.

c)

A statement that evaluates to Yes and No.

d)

A statement that evaluates to True, False and anything in between.

80.

The Logic Gate that gives an output of 1 when either input is 1, is called a

a)

NOT

b)

OR

c)

AND

81.

The Logic Gate that gives an output of 1 when BOTH inputs are 1 ONLY, is called a

a)

NOT

b)

OR

c)

AND

82.

Evaluate the following boolean expression:

4 > 2

a)

YES

b)

NO

83.

A Boolean Expression is (a)  

Choose from the below words
Different ways to search things to
Easier ways to find what your looki
84.

Why is using OR important when searching two main words?

a)

It will show both options

b)

It will show one of the words you want

c)

It will pick one of the words to show

85.

If I write AND in-between two words what will happen?

a)

Both words will form together

b)

Both words will show up

c)

The words combined/together will show up

86.

What is a Boolean Operator?

a)

A value that contains a condition

b)

A value that contains a number

c)

A value that contains a string

d)

A value that contains a boolean

87.

Which type of Boolean checks for a specific condition?

a)

Conditional Boolean

b)

Comparative Boolean

c)

Arithmetic Boolean

d)

Logical Boolean

88.

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?

a)

Comparative Boolean

b)

Checks for a specific condition

c)

Conditional Boolean

d)

Logical Operations

89.

Imagine Daniel is driving and he sees a traffic light turn red. What should Daniel do if the condition 'light=red' is true?

a)

Stop

b)

Go ahead

c)

Check for peanuts

d)

Compare values

90.

Ethan, Scarlett, and Nora are at a traffic signal. What should they do if the signal light is not red?

a)

Go ahead

b)

Stop

c)

Check for peanuts

d)

Compare values

91.

In what types of coding structures are Boolean Operators used?

a)

repetition and selection

b)

sequential

c)

looping and repetition

d)

sequential and repetition

92.

What happens if the word being searched exists?

a)

Condition is True

b)

Condition is False

c)

Condition is Unknown

d)

Condition is Invalid

93.

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?

a)

Condition is False and the door does not open

b)

Condition is True and the door opens

c)

Condition is Unknown and the game has a logic error

d)

Condition is Invalid because of syntax errors

94.

What does a Comparative Boolean code look for?

a)

A special character

b)

it compares values

c)

A specific string

d)

A specific floating point

95.

What happens if the code finds a 'Yes'?

a)

Make the statement

b)

Ignore the statement

c)

Check for peanuts

d)

Compare values

96.

When searching in a database or on the Internet, the first results you get are the best results. True or false?

a)

True

b)

False

97.

Boolean operators help you ________ when searching for information. Which answer is WRONG?

a)

Narrow your search results

b)

Broaden your search results

c)

Get the most recent search results

d)

Be in control of your search results

98.

List the three Boolean operators that act as commands in a search.

a)

AND

b)

BUT

c)

NOT

d)

OR

99.

Which Boolean operator should you use between two keywords when you want to NARROW, or focus, your search results? Mark all that are correct.

a)

AND

b)

BUT

c)

NOT

d)

OR

100.

Which Boolean operator should you use between two keywords when you want to BROADEN, or get more, search results?

a)

AND

b)

BUT

c)

NOT

d)

OR

101.

Which Boolean operator should you use to eliminate search results that contain a specific keyword?

a)

AND

b)

BUT

c)

NOT

d)

OR

102.

What symbol does the search engine Google use in place of the NOT operator?

a)

hashtag (#)

b)

minus sign (-)

c)

plus sign (+)

d)

slash sign (/)

103.

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?

a)

pigs AND chickens

b)

I want search results about pigs, BUT I don’t want results about chickens.

c)

pigs NOT chickens

d)

pigs OR chickens

104.

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?

a)

Puma is different than cougar, and you told the computer to omit articles with the word puma in them.

b)

Puma is another word for cougar, and you told the computer to find articles with the word cougar, the word puma, or both words.

c)

Puma is another word for cougar, and you told the computer to only search for puma.

d)

Actually, your results will be the same with both searches because the two keywords mean the same thing.

105.

What does the Boolean operator AND do in a search?

a)

Combines search terms randomly

b)

Excludes specific search terms

c)

Broadens the search results

d)

Narrows the search results

106.

How does using the Boolean operator OR help in a search?

a)

Combines search terms randomly

b)

Excludes specific search terms

c)

Broadens the search results

d)

Narrows the search results

107.

What is the purpose of the Boolean operator NOT in a search?

a)

Narrows the search results

b)

Broadens the search results

c)

Excludes specific search terms

d)

Combines search terms randomly

108.

Which Boolean operator is used to broaden search results?

a)

NAND

b)

NOT

c)

OR

d)

AND

109.

How does using the Boolean operator NOT help in a search?

a)

Combines search terms randomly

b)

Excludes specific search terms

c)

Broadens the search results

d)

Narrows the search results

110.

What happens when you combine the Boolean operator AND with two search terms?

a)

Results include either term

b)

Results include both terms

c)

Results exclude one term

d)

Results are random

111.

What would be the results of this search?

Italy NOT (Politics OR Sports)

a)

All information about Italy.

b)

Information about politics or sports in all countries other than Italy.

c)

Information about Italy, excluding politics and sports.

d)

Information about Italy and sports, but not politics.

112.

What would be the results of this search?

(wind power OR alternative energy OR solar power) AND global warming

a)

Information about global warming that must also include at least one of the phrases in parentheses

b)

Information about global warming that cannot include any of the phrases in parentheses

c)

Information about global warming that includes all of the phrases in parentheses

d)

Information about global warming or about any of the phrases in parentheses

113.

What would be the result of this search?

(Man OR Men) AND Fitness

a)

Anything having to do with fitness.

b)

Articles about an individual man or men, and articles about fitness.

c)

Articles about fitness that are specifically related to a man or men.

d)

Articles about fitness for either a man or for men, but not both.

114.

What would be the result of this search?

(Man OR Men) AND (Fitness NOT Yoga)

a)

Articles about a man's or men's fitness, not including articles that include yoga.

b)

Articles about an individual man or men, and articles about fitness.

c)

Articles about men, excluding articles about fitness and yoga.

d)

Articles about fitness for either a man or for men, and articles about yoga.

115.

Using the Boolean Operator AND will broaden your results and produce more hits.

a)

True

b)

False

116.

Using the Boolean Operator OR in a search will broaden your results and produce more hits.

a)

True

b)

False

117.

Using the Boolean Operator NOT will narrow your research and limit your number of hits.

a)

True

b)

False

118.

What would be the results of this search?

Italy NOT (Politics OR Sports)

a)

All information about Italy.

b)

Information about politics or sports in all countries other than Italy.

c)

Information about Italy, excluding politics and sports.

d)

Information about Italy and sports, but not politics.

119.
The second part of if, that is executed when the condition is false
a)
if
b)
else
c)
for
d)
input
120.

What is the output?

a)

more than 7

b)

more than 23

c)

spam

d)

7

121.

Pieces of code that only run "under certain conditions":

a)

conditional statements

b)

control flow statments

c)

syntax

d)

variables

122.

What is the output?

a)

True

b)

False

c)

condition1

d)

condition2

123.

What does the boolean operator "AND" help us do?

a)

add more key words

b)

seperate two key words

c)

narrow your search between one or two items

124.

To limit your search you would use which Boolean Operator?

a)

and

b)

not

c)

or

125.

Which boolean operator would you use to elminate unimportant information?

a)

not

b)

and

c)

or