PSEUDO Code
---
**Pseudocode**

This document provides examples of pseudocode in the style typically used in the AP Computer Science Principles (CSP) course. Pseudocode is an informal way to represent algorithms. The examples illustrate key concepts commonly covered in AP CSP.

**Example 1: Calculate the Average of Three Numbers**

*Description:*
This example demonstrates how to calculate the average of three numbers in pseudocode style. Each step is explained in detail.

*Pseudocode:*

Step 1: Input three numbers

num1 = input(“Enter the first number: “) num2 = input(“Enter the second number: “) num3 = input(“Enter the third number: “)

Step 2: Calculate the sum

sum = num1 + num2 + num3

Step 3: Calculate the average

average = sum / 3

Step 4: Output the average

print(“The average of the three numbers is”, average)


*Notes:*
- Input is taken for three numbers using the `input` function.
- The sum of the three numbers is calculated and stored in the `sum` variable.
- The average is computed by dividing the sum by 3 and stored in the `average` variable.
- Finally, the average is displayed to the user.

**Example 2: Find the Maximum of Two Numbers**

*Description:*
This example shows how to find the maximum of two numbers using pseudocode. The steps are explained along with the pseudocode.

*Pseudocode:*

Step 1: Input two numbers

a = input(“Enter the first number: “) b = input(“Enter the second number: “)

Step 2: If a is greater than b, output a; otherwise, output b

if a > b: print(“The maximum is”, a) else: print(“The maximum is”, b)


*Notes:*
- Input is taken for two numbers using the `input` function.
- The `if` statement is used to compare `a` and `b`, and the maximum is printed accordingly.
---

You can copy and paste these notes and pseudocode examples into a plain text document or a text editor for reference.