pxt-microbit
Version:
micro:bit target for Microsoft MakeCode (PXT)
24 lines (15 loc) • 1.38 kB
Markdown
# Conditional statements

This unit introduces the Logic blocks, such as ‘If…then’ and ‘If…then…else’. You will learn what **conditional** statements are, and why and when to use them in a program, practicing skills of creativity, problem solving, and collaboration in the process. You will code a game of “Rock, paper, scissors” with the micro:bit via the programmable buttons and the LED screen. In the final project, you'll be designing, building, and coding your own unique micro:bit-based board game using conditionals.
## Lesson objectives
You will...
* Understand what conditional statements are, and why and when to use them in a program.
* Learn how to use the Logic blocks 'If...then' and 'If…then...else'.
* Practice using the Logic blocks so different conditions yield specified outcomes.
* Demonstrate understanding and apply skill by creating a game that uses a micro:bit and a program that correctly and effectively uses conditionals.
## Lesson plan
1. [**Overview**: Conditional statements](/courses/csintro/conditionals/overview)
2. [**Activity**: Rock, paper, scissors](/courses/csintro/conditionals/activity)
3. [**Project**: Board game](/courses/csintro/conditionals/project)
## Related standards
[Targeted CSTA standards](/courses/csintro/conditionals/standards)