الانتقال إلى المحتوى

Lesson 35: Robot commands

English

Text into actions

  • A route can be written as text: short commands like F400 or R90.
  • The program cuts each command into a letter (what to do) and a number (how far).
  • This is string handling: taking text apart and turning it into numbers.

Words for this lesson

Word Meaning
string text: a list of characters
slice part of a string, e.g. from position 1 to the end
split cut a string into a list at a separator
casting changing a type, e.g. text "400" to the number 400

تسجيل الدخول أو إنشاء حساب

IGCSE, A-Level & AP