Crossing the street flowchart
A school-level everyday algorithm: is the light green, is there enough time left; otherwise wait. Safety rules as a flowchart.
The diagram
Reading it step by step
- 1. Start at 'Start'.
- 2. 'Stand at the crossing' is a processing step. Next: 'Walk signal green?'.
- 3. Decide 'Walk signal green?': if 'no', go to 'Wait'; if 'yes', go to 'Enough time left?'.
- 4. 'Wait' is a processing step. Next: 'Walk signal green?'.
- 5. Decide 'Enough time left?': if 'no', go to 'Wait'; if 'yes', go to 'Look both ways'.
- 6. 'Look both ways' is a processing step. Next: 'Cross'.
- 7. 'Cross' is a processing step. Next: 'End'.
- 8. End at 'End'.
Shape by shape
| Shape | Symbol | Connections |
|---|---|---|
| Start | Terminator | → Stand at the crossing |
| Stand at the crossing | Process | → Walk signal green? · ← Start |
| Walk signal green? | Decision | → Wait(no), Enough time left?(yes) · ← Stand at the crossing, Wait |
| Wait | Process | → Walk signal green? · ← Walk signal green?, Enough time left? |
| Enough time left? | Decision | → Wait(no), Look both ways(yes) · ← Walk signal green? |
| Look both ways | Process | → Cross · ← Enough time left? |
| Cross | Process | → End · ← Look both ways |
| End | Terminator | ← Cross |
Symbols used here
| Symbol | Meaning |
|---|---|
| Terminator | Where the flow starts or ends; a rounded rectangle. |
| Process | One action such as a calculation; a rectangle. |
| Decision | A question whose answer picks the next path; a diamond. |
| Flow line | The order of steps, in the arrow direction. |
Diagram text
Paste this text into the editor to get the same picture, then change the names to fit your own work.
# Crossing the street flowchart
flowchart TD
s(["Start"])
a["Stand at the crossing"]
b{"Walk signal green?"}
c["Wait"]
d{"Enough time left?"}
e["Look both ways"]
f["Cross"]
z(["End"])
s --> a
a --> b
b -->|no| c
c --> b
b -->|yes| d
d -->|no| c
d -->|yes| e
e --> f
f --> z