AI ProgrammingAcademy
Back to Samples

Optional Math: Numbers and Percentages

Refresh everyday arithmetic with small programming examples. No advanced math or previous coding experience required. Optional support only—not a prerequisite for exams or certificates.

Learning Objectives

  • Read fractions and decimals

    Recognize that 1/4, 0.25 and 25% describe the same share of a whole.

  • Calculate a percentage

    Divide the part by the whole, then multiply by 100.

  • Follow calculation order

    Use parentheses to make the intended calculation explicit.

Core Concepts

1. Start with a whole and a part

If 3 of 4 tasks are complete, your fraction is 3/4. Divide 3 by 4 to get 0.75; multiply by 100 to get 75%. The denominator is the whole, so it cannot be zero.

completed = 3
total = 4
share = completed / total
print(share)        # 0.75
print(share * 100)  # 75.0

2. Read Python arithmetic

The symbols +, -, * and / mean add, subtract, multiply and divide. Python uses ** for a power, not ^. Multiplication and division happen before addition and subtraction; parentheses happen first.

print(2 + 3 * 4)    # 14
print((2 + 3) * 4)  # 20
print(2 ** 3)       # 8

3. Percentages versus percentage points

Moving from 60% to 75% is an increase of 15 percentage points. Relative to the original 60, that is a 25% increase: (75 - 60) / 60 × 100. These describe different comparisons.

old = 60
new = 75
print(new - old)             # 15 percentage points
print((new - old) / old * 100) # 25 percent increase

4. Check what a number means

Always name the unit and the whole. A model getting 18 of 20 examples right has 90% accuracy on those examples, not a promise of 90% accuracy everywhere.

When this helps: Use this refresher for progress indicators, discounts and simple evaluation reports in Foundations.

Practice Exercise

Calculate task completion

Eight of ten tasks are complete. Calculate the completion percentage and remaining tasks. Predict the results before running the Python code.
completed = 8
total = 10
# Calculate percentage and remaining tasks
# Print each result on its own line

Concept Quiz

Test your understanding with this quiz. Select the best answer for each question.

1. What is 6 out of 8 as a percentage?

2. What does (2 + 3) * 4 evaluate to?

Are there any issues that Customer Support should be aware of?

Help optimize our AI programming lessons to ensure student success!

Sign in to send a comment to Customer Support.

Hide Icons