AP Computer Science Principlesmediummcq1 pt

An if statement is used to

A.run code only when a condition is true
B.repeat code forever
C.define a variable
D.print text

Explanation

Core Concept

Conditionals branch on a test.

Correct Answer

Arun code only when a condition is true

More Unit 3: Algorithms and Programming practice questions

Try a random question →

Practice more AP Computer Science Principles questions with full explanations

Practice Unit 3: Algorithms and Programming Questions →