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
15 questions
Intro to Java Loops

Quiz
•
9th - 12th Grade
10 questions
Global and local variables

Quiz
•
10th - 12th Grade
10 questions
For Loop in Python

Quiz
•
11th Grade
16 questions
For and While Loops in Python

Quiz
•
9th - 12th Grade
14 questions
AP CSP: Interpreting Algorithms / Block Programming Language

Quiz
•
9th - 12th Grade
16 questions
Subroutines

Quiz
•
9th - 11th Grade
11 questions
Python strings

Quiz
•
8th - 9th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
40 questions
LSHS Student Handbook Review: Pages 7-9

Quiz
•
11th Grade
24 questions
Scientific method and variables review

Quiz
•
9th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
19 questions
Mental Health Vocabulary Pre-test

Quiz
•
9th Grade