AP Computer Science A Unit 4 Section 1 (While loops)

AP Computer Science A Unit 4 Section 1 (While loops)

10th - 12th Grade

5 Qs

quiz-placeholder

Similar activities

2025 python class first quiz

2025 python class first quiz

9th Grade - University

10 Qs

MEDIA AND INFORMATION LITERACY

MEDIA AND INFORMATION LITERACY

12th Grade

10 Qs

DNS dan Web server

DNS dan Web server

11th Grade

10 Qs

Quiz Pemograman Web

Quiz Pemograman Web

11th Grade

10 Qs

Quiz Lec2

Quiz Lec2

KG - University

10 Qs

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

COMPUTER PROGRAMMING Q2_FLOWCHART (2 points each)

11th - 12th Grade

10 Qs

OCR GCSE CS - 2.1 ERL sorts and searches

OCR GCSE CS - 2.1 ERL sorts and searches

10th - 11th Grade

9 Qs

Pengenalan Blender Lanjutan

Pengenalan Blender Lanjutan

11th Grade

10 Qs

AP Computer Science A Unit 4 Section 1 (While loops)

AP Computer Science A Unit 4 Section 1 (While loops)

Assessment

Quiz

Computers

10th - 12th Grade

Practice Problem

Hard

Created by

Herman Galioulline

Used 30+ times

FREE Resource

About this resource

This quiz focuses on while loops in Java programming, specifically designed for AP Computer Science A students at the high school level (grades 10-12). The questions assess students' understanding of loop execution, trace analysis, and conditional logic within iterative structures. Students need to demonstrate their ability to mentally execute code step-by-step, predict output values, identify correct loop conditions, and recognize potential infinite loop scenarios. The core concepts required include understanding how while loop conditions are evaluated, how variables are modified within loop bodies, and how loops terminate when conditions become false. Students must also apply knowledge of integer division, modulus operations, and string concatenation within the context of loop iterations. Created by Herman Galioulline, a Computers teacher in Switzerland who teaches grades 10-12. This quiz serves as an excellent formative assessment tool for students beginning their study of iterative control structures in AP Computer Science A. Teachers can use this as a warm-up activity to gauge student readiness before introducing more complex loop concepts, or as homework following initial instruction on while loops. The quiz effectively supports classroom instruction by requiring students to trace through code execution, identify logical errors in loop conditions, and predict program output—all essential skills for success in computer science. This assessment aligns with College Board standards for AP Computer Science A, specifically addressing learning objectives related to iteration (Unit 4) and helping students develop computational thinking skills through code analysis and debugging practice.

See more

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

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

21

161116

161161

16111621

Nothing is printing because of an infinite loop.

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

What will be the value of count after executing the code segment?

6

5

4

1

0

3.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

This code segment is intended to store the sum of all multiples of 10 between 10 and 100, inclusive (10 + 20 + ... + 100), in the variable total.


What should /* missing code */ be?

x < 100

x <= 100

x > 10

x >= 10

x != 10

4.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

This code is intended to print the sum of the digits in num. For example, when num is 12345, the code segment should print 15, which represents the sum 1 + 2 + 3 + 4 + 5.


What should /* missing loop header */ be?

while (num > 0)

while (num >= 0)

while (num > 1)

while (num > 2)

while (num > sum)

5.

MULTIPLE CHOICE QUESTION

5 mins • 1 pt

Media Image

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

0

1

2

3

Nothing is printed.

Discover more resources for Computers