← Lessons
🧩 Scratch for Beginners
Conditions and sensing
## Conditions (if)
When your program needs to make a decision, use `if`.
```
if <key (space) pressed?> then
say [Jumped!]
else
say [Waiting]
end
```
## Sensing
- `touching (edge)?` — is it touching the edge?
- `key (space) pressed?` — is the key pressed?
- `touching color [ ]?` — is it touching a colour?
## Comparing (Operators)
`(x) > (50)`, `(x) < (50)`, `(x) = (50)`, plus `and`, `or`, `not`.
💡 Want to track which lessons you've read and solve problems for points? Sign up for free or log in.