← 3.3 Identifiers and Operators
Operators
Computer Studies · Grade 10 · about 40 minutes
The four families of operator - arithmetic, relational, logical and assignment - how they work, precedence, and the store-versus-compare trap.
Sign in to read this lesson
Lessons are for learners and teachers with an account. Browsing the curriculum — subjects, strands and what each sub-strand covers — stays open to everyone.
- 7 sections of explanation, worked examples and diagrams
- 1 practice task with hints and worked answers
- A quiz that marks itself as you go
- Your progress kept across every subject you take
Other lessons in this sub-strand
- The elements of a program: identifiers, variables and input/output
- Operators
- How a program is structured
- Syntax and the three kinds of error
- Reserved words you cannot use as names
- Identifiers and naming rules
- Data types: integer, float, string and Boolean
- Type conversion before arithmetic
- Declaring variables in Python (and how C differs)
- Constants: VAT, PI and a fee rate
- Input statements: reading the user
- Output statements: showing the result
- Arithmetic operators in Kenyan calculations
- Relational operators: questions that answer True or False
- Logical operators: and, or, not
- Assignment and compound assignment
- Operator precedence: when in doubt, brackets
- Standard libraries: math and random