---
title: "Conditional Statements — AP CSP Definition & Exam Guide"
description: "Conditional statements (if-statements) run code only when a Boolean expression is true, letting programs make decisions. Core to AP CSP Topic 3.6 and selection."
canonical: "https://fiveable.me/ap-comp-sci-p/key-terms/conditional-statements"
type: "key-term"
subject: "AP Computer Science Principles"
---

# Conditional Statements — AP CSP Definition & Exam Guide

## Definition

Conditional statements are programming constructs that allow the execution of different blocks of code based on certain conditions. They enable programs to make decisions and perform different actions depending on whether a condition is true or false.

## Related Study Guides

- [3.6 Conditionals](/ap-comp-sci-p/unit-3/conditionals/study-guide/JAgsZEPFqWJchRBqrX1O)

## Review

### Related Terms

- If Statements: If statements are a type of conditional statement that execute a block of code only if a specific condition is true.
- Boolean Expression: A boolean expression is an expression that evaluates to either true or false, which is used as the condition in conditional statements.
- Else Statements: Else statements are used in conjunction with if statements and provide an alternative block of code to be executed when the condition in the if statement evaluates to false.
