29W Quiz 1 - PLTW
Quiz
•
Computers
•
8th - 12th Grade
•
Hard
Tony Banning
Used 4+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
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
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
What is printed as a result of executing the code segment?
A-
AAA
A
AA
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
M1_Final_Quiz1_2017
Quiz
•
7th - 8th Grade
10 questions
For loop
Quiz
•
8th Grade
20 questions
L4 Homework
Quiz
•
8th Grade
10 questions
Activity 1: How well do you know Java?
Quiz
•
9th Grade
20 questions
Computer Science - X
Quiz
•
8th - 10th Grade
10 questions
THE PHOTOSHOP WINDOW
Quiz
•
7th - 8th Grade
20 questions
Quiz
•
7th - 12th Grade
10 questions
NHTW Programming
Quiz
•
9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
