דלג לתוכן

Lesson 57: Weather week

English

A table of readings

  • A weather station takes several readings every day. A 2D array stores them like a table: one row for each day, one column for each reading.
  • Two loops, one inside the other, visit every cell: the outer loop picks the day, the inner loop the reading.
  • Parallel arrays use the same index for the same thing: days[1] and readings[1] are both Tuesday.

Words for this lesson

Word Meaning
2D array a table of values with rows and columns
nested loop a loop inside another loop
parallel arrays arrays where the same index means the same item

היכנס או צור חשבון

IGCSE, A-Level & AP