Math and Boolean Expressions

Math and Boolean Expressions

Assessment

Flashcard

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

29 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the value of thisVariable after the code is executed?
myVariable ← 30
yourVariable ← 5
thisVariable ← yourVariable + myVariable / 10

Back

8

2.

FLASHCARD QUESTION

Front

What is displayed after the following code segment is executed?
A ← 100
B ← A - 25
C ← A - B
A ← A MOD 3
B ← B + 2
DISPLAY(A + B + C)

Back

103

3.

FLASHCARD QUESTION

Front

What is displayed after the following code segment is executed?
A ← 100
B ← A - 25
C ← A - B
A ← A MOD 3
B ← B + 2
DISPLAY(A + B + C)

Back

cucumber
tomato

4.

FLASHCARD QUESTION

Front

What is displayed when the code is run? Options: Best, Good, Okay, Good, Best, Okay

Media Image

Back

Okay
Good

5.

FLASHCARD QUESTION

Front

Consider the following code segment.
DISPLAY("Z")
printLetters()
DISPLAY("W")
PROCEDURE printLetters()
{
DISPLAY("X")
DISPLAY("Y")
}
What is displayed to the screen when the code executes?

Back

Z
X
Y
W
X
Y

6.

FLASHCARD QUESTION

Front

Consider the following code.
num ← 5
other ← 4
largest()
PROCEDURE largest()
{
IF(<missing condition>)
{
DISPLAY(num + " is the larger number")
}
ELSE
{
DISPLAY(other + " is the larger number")
}
}
Which of the following should replace <missing condition> so that the code segment works as intended?
Options: other MOD num=0, num MOD other=0, num>other, num < other

Back

num>other

7.

FLASHCARD QUESTION

Front

Media Image

Back

Media Image

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?