Code Tracing Quiz

Passage
•
Computers
•
9th - 12th Grade
•
Hard
Thanh Le
Used 1+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of tracing code?
To create charts for code segments
To execute loops
To write code more efficiently
To track variables and output for troubleshooting logic errors
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the first step in tracing the execution of a loop?
Create a chart with columns for variables and output
Initialize the loop control variable
Display the output after the loop
Add the values for each variable for each iteration
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the first code segment, what is the value of sum after the loop?
0
10
6
15
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the second code segment, what is the output after the loop?
1, 2, 3, 4, 6, 12
12
1, 2, 3, 4, 6
12, 1, 2, 3, 4, 6
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the initial value of fact in the second code segment?
2
0
12
1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output after the loop in the second code segment?
12, 1, 2, 3, 4, 6
1, 2, 3, 4, 6
1, 2, 3, 4, 6, 12
12
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the value of sum after the loop in the first code segment?
0
6
15
10
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python Basic files

Quiz
•
10th - 12th Grade
10 questions
GDScript Quiz - Lesson 3 - Conditional statements & Iteration

Quiz
•
12th Grade
7 questions
Java Basics #2

Quiz
•
10th - 12th Grade
10 questions
Pseudocode WHILE Loops

Quiz
•
10th - 12th Grade
10 questions
while loop

Quiz
•
9th Grade
15 questions
Iteration

Quiz
•
9th - 12th Grade
17 questions
Tracing Loops in Java

Quiz
•
12th Grade
10 questions
W8-11

Quiz
•
10th - 11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade