Search Header Logo

Praxis 5652 Computer Science Prep Mod 6 Basic Boolean Logic

Authored by Brandon Milam

Computers

Professional Development

Used 1+ times

Praxis 5652 Computer Science Prep Mod 6 Basic Boolean Logic
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following code segment.

boolean x <- true
boolean
y <- false
boolean
z <- true

Which expression evaluates to true?

(x and y) and (y or z)

not((x and y) or (x and z))

(x and y) and (x and z)

(x and y) or (x and z)

Answer explanation

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following variable declarations and initializations.

Which expression evaluates to false?

 

a < b == c < b

a < b == b < c

Answer explanation

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

daysMissed is 6, gpa 3.5

daysMissed is 4, gpa 3.0

daysMissed is 5, gpa 2.5

daysMissed is 6, gpa 3.0

Answer explanation

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following variable declarations and initializations.

What is printed as a result of executing the code segment?

a == b

false

true

10 == 10

Answer explanation

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following statement.

What is the value of z after the statement has been executed?

9

6

true

false

Answer explanation

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following Boolean expression in which the int variables x and y have been properly declared and initialized..

Which expression below is equivalent to the one above?

Answer explanation

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the following code segment.

Select the correct missing code that will make z evaluate to true?

a <- true
b <- false
c <- true
d <- false

a <- false
b <- false
c <- false
d <- false

a <- false
b <- true
c <- false
d <- true

 

a <- true
b <- true
c <- false
d <- false

Answer explanation

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?