コンテンツへスキップ

Lesson 21: Find the way home

English

Remember the way

  • A robot that delivers a parcel must also find its way back.
  • The robot can keep its moves in a list. On the way back it does the moves again, but last first.
  • This is how the "back" button in a web browser works too: the last page you saw is the first one you go back to.

Words for this lesson

Word Meaning
list many values in order: ["L", "F", "R"]
append add a value to the end of a list
reverse turn the order round: last becomes first
stack a list where the last value in is the first value out

ログインまたはアカウント作成

IGCSE, A-Level & AP