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
13 questions
Unit 4 AP CSA Review

Quiz
•
12th Grade
17 questions
GCSE Computer Science - Python Programming Concepts

Quiz
•
9th - 11th Grade
13 questions
APCSA Unit 3 Review

Quiz
•
9th - 12th Grade
16 questions
Subroutines

Quiz
•
9th - 11th Grade
15 questions
CP M4 Repetition & Loops

Quiz
•
9th - 12th Grade
10 questions
Scratch Coding Vocabulary

Quiz
•
9th Grade
10 questions
Python Flow Control

Quiz
•
9th - 12th Grade
10 questions
Quiz 16 - Arrays and Loops

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

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

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade