Topic 2: Conditionals (If-Then) in Block-Based Coding
A conditional (if-then) statement in coding makes a program perform an action only if a certain condition is true.
Core concept
An 'if-then' block checks a condition, like 'if score > 10', and performs an action, like 'then show a winning message', only if that condition is true.
How it works
Conditionals let programs make decisions, responding differently based on different situations or inputs.
Why it matters
We can also use 'if-else' blocks, which perform one action if the condition is true and a different action if it's false.
Key detail
Understanding conditionals helps us create interactive programs and games that respond intelligently to different situations.
Exam highlight
Key diagram

- A picture showing an 'if touching edge, then bounce' block combination.
Keywords worth remembering
Trending
Most searched
Study resources
Notes & downloads
Quick notes
• An 'if-then' checks a condition before acting.
• Example: 'if score > 10, then show a message'.
• Conditionals let programs make decisions.
• Programs respond differently to different situations.
• 'If-else' performs different actions based on true/false.
• Conditionals create interactive programs.
• They help games respond intelligently.
• This is a fundamental coding concept.