Bee Learnt Logo
Bee Learnt
FeatureBrowse allPricingAboutSupport
Bee Learnt

Bee Learnt gives South African Grade 10–12 learners a cleaner route from classwork to NSC readiness — with parents and tutors supporting the journey.

WhatsApp: 0685537312

Support email: admin@beelearnt.co.za

Learn
FeaturesBrowse subjectsPricing
Get started
Create accountSign inContact support
Company
About Bee LearntAdvertisingContact
Legal
Privacy policyTerms of serviceCookie policyAd choices

© 2026 Bee Learnt. All rights reserved.

CAPS aligned · Grades 10–12 · NSC ready

Privacy choices

Allow analytics and advertising services to help us understand site usage and measure campaigns.

Privacy Policy
  1. Subjects
  2. /
  3. Information Technology
  4. /
  5. Information Technology Grade 10 — Practical
  6. /
  7. Introduction to Programming (Delphi)
  8. /
  9. Selection (if statements)
Grade 10 · Practical

Selection (if statements)

Introduction to Programming (Delphi) · about 4 min

Educational overview for Selection (if statements)Visual overview: Selection (if statements)
1 MIN READ
2 study sections · pause after each one and recall the key idea

Selection lets a program choose between paths based on a condition — the heart of decision-making in code.

Key points
  • `if condition then … else …` runs one branch or the other; use `begin … end` to group several statements.
  • Conditions use relational operators (=, <>, <, >, <=, >=) and logical operators (and, or, not).
  • Nested ifs and `case` handle multiple options; `case` is cleaner when testing one variable against many fixed values.
  • Watch the boundaries: is it `>` or `>=`? Off-by-one boundary errors are a classic bug.
Key terms
  • Condition — a boolean expression that is True or False.
  • case statement — selection against many constant values of one ordinal variable.
EXAM TIP

for "if the mark is 50 or more, display Pass" the condition is `mark >= 50` — read the wording for "or more/at least" (>=) vs "more than" (>).


Previous

Variables and data types

Next

Iteration (loops)