Program exercise · Hard · ST · 16 min · Free

Rewrite the step machine

Five ladder rungs move Step through Idle, Filling and Draining. Rewrite the sequence in the Text routine with a CASE, so Step, Fill and Drain match on every scan.

Opens the exercise in the FORGE workspace. Sign in to have your result checked and earn 230 XP.

How it is checked.

  • One branch for each step
  • Step moves on Start, Full and Empty
  • Fill and Drain follow Step on the same scan

Part of Structured Text. All practice exercises.