True or False?
The relational operators used to compare values in a condition, how a condition evaluates to true or false, and the boundary difference between less than and less than or equal to.
Get the method right under pressure
Free interactive practice on the steps that lose marks under exam pressure.
Start revising freeWhat you'll cover
Is it true or false?
Programs make decisions by testing conditions, and every condition is either true or false. To write a condition you compare two values with a relational operator, such as less than or greater than. This module works through those operators and the boundary that trips people up: the difference between less than and less than or equal to.
Comparison vocabulary
Learn these four terms before you test conditions.
The boundary case
The equal case is exactly where < and <= differ.
Check the boundary
A top answer evaluates a condition exactly and never guesses at the edge. The plain signs < and > leave out the equal case, while <= and >= include it, so 5 < 5 is false but 5 <= 5 is true. Compare the two values, apply the operator, and the answer is always true or false.
Match the operator
- <
- >
- <=
- >=
- less than
- greater than
- less than or equal to
- greater than or equal to
Match the meaning
- the equals sign in a test
- the not-equal test
- a relational operator
- a condition
- true when the two values are the same
- true when the two values are different
- a symbol that compares two values
- a test that gives true or false
Is 5 less than 5?
What is the value of the condition 5 < 5?
- False.
- True.
- It depends on the program.
- Neither true nor false.
Which are true?
Select the TWO conditions that are true.
- 3 < 5
- 5 <= 5
- 5 > 5
- 2 > 4
Order the evaluation
Put the steps of working out a condition in order, earliest first.
- Read the two values
- Read the operator between them
- Compare the values with the operator
- Decide whether it is true or false
- Use the result to make the decision
Complete the facts
A symbol that compares two values is a relational _____. A test that gives true or false is a _____. The condition 5 < 5 is _____, because < leaves out the equal case. The condition 5 <= 5 is _____, because <= includes it. A condition can only ever be true or _____.
Count the true ones
Look at the numbers 3, 5, 7 and 9. Count how many of them are greater than 5. What is the answer?
Spot the true conditions
Tap the TWO conditions that are true.
- 4 < 8
- 6 >= 6
- 3 > 7
- 9 < 2
Evaluate the condition
Read each condition and choose its value.
- A program checks the condition 7 <= 7. What is its value?
- A program checks the condition 4 > 4. What is its value?
- A score of 5 must pass the test score >= 5 to win. Does a score of 5 pass?
Explain the operators
Explain the relational operators and how a condition is worked out to true or false.
- Describe what a relational operator and a condition are
- Give an example of a condition that is true and one that is false
- Explain the boundary difference between less than and less than or equal to