Logical operators (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
9 cards from this deck
ShowHide
Practise the cards
9 cards from this deck
What are logical operators?
What are logical operators?
Symbols that combine conditions using Boolean values (true/false)
Boolean values
Boolean values
True or False
'and' operator returns True when
'and' operator returns True when
Both sides of the condition are true
'or' operator returns True when
'or' operator returns True when
At least one side (or both) is true
'not' operator function
'not' operator function
Inverts result (True→False, False→True)
How many operands do 'and' & 'or' need?
How many operands do 'and' & 'or' need?
Two operands (one on each side)
How many operands does 'not' need?
How many operands does 'not' need?
One operand only
Logical operators use in selection
Logical operators use in selection
With if...elif...else statements
Logical operators use in repetition
Logical operators use in repetition
With while loops
