Search Header Logo

29W Quiz 1 - PLTW

Authored by Tony Banning

Computers

8th - 12th Grade

Used 4+ times

29W Quiz 1 - PLTW
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

Media Image

What will be the value of count as a result of executing the code segment?

100

161

241

341

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What value is stored in the variable count as a result of executing the code segment?

16

11

71

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following can be used to replace

/* missing condition */ so that the method will work as intended?

count != 0

num != 0

num == 0

count !=-= 0

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following can be used as a replacement for /* missing loop header */ so that the code segment prints out the string "1 2 3 4 "?

while (k < 3)

while (k < 4)

while (k < 5)

while (k <= 4)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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

A-

AAA

A

AA

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Code segment 1 prints the sum of the integers from 1 through 30, inclusive. Which of the following best explains how the output changes from code segment 1 to code segment 2 ?

Code segment 2 will print the sum of only the odd integers from 1 through 30, inclusive because it starts k at one, increments k by twos, and terminates when k exceeds 30.

Code segment 1 will print the sum of only the odd integers from 1 through 50, inclusive because it starts k at one, increments k by twos, and terminates when k exceeds 30.

Code segment 1 and 3 will print the sum of only the odd integers from 1 through 75, inclusive because it starts k at one, increments k by twos, and terminates when k exceeds 30.

Code segment 2 will print the sum of only the odd integers from -5 through -30, inclusive because it starts k at one, increments k by twos, and terminates when k exceeds 30.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following best explains how the output changes from code segment I to code segment II?

The code segments print the same values but in a different order, because code segment III iterates from 11 to 15 and code segment II iterates from 15 to 21.

The code segments print the same values but in a different order, because code segment II iterates from 1 to 5 and code segment II iterates from -5 to -1.

The code segments print the same values but in a different order, because code segment I iterates from 2 to 6 and code segment II iterates from 5 to 1.

The code segments print the same values but in a different order, because code segment I iterates from 1 to 5 and code segment II iterates from 5 to 1.

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?