Beta

Sync to cloud

Uses your current signed-in YoolVi account. A Learn profile is not required.

Upload a snapshot of this browser’s saved lesson work across all subjects, including notes, experiments, journal and review history. Existing guest work is included only when you confirm below. This does not upload account credentials or award XP.

Sync uploads to your private account; it does not automatically merge or replace this device’s work. On another device, download the cloud copy and use My Learning’s backup import. The previous cloud snapshot is retained when a new one replaces it.

Export or import this device’s work

No background uploads. Edits made after a snapshot need another sync. On shared devices, work is bound to the first account observed by cloud sync; another account must use a separate browser profile. Keep your own downloaded backup too.

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Read rows, columns and units

Back to Programming for AI: Make It Run

Optional arithmetic and percentage refresher — return to this activity

A table is a list of rows with a declared meaning for each column. Shape describes rows and columns. A two-by-two table has two rows, each with two values; equal dimensions alone do not prove the columns mean the same thing.

Python workshop: public teaching inputs

All people, records and numbers in this pack are authored teaching examples. They are not records or performance claims about real organizations.

  • PY1 · Price rows are [[2, 3], [4, 2]]: each row contains quantity then credits per item. Expected line totals are 6 and 8 credits. Lists use zero-based indexing: the first item has index 0.
  • PY2 · A function accepts input and returns a result. The supplied workshop demonstrates line_total(quantity, price). A branch selects an action; a loop repeats it. Negative quantity is rejected, not silently changed.
  • PY3 · A test compares observed behavior with an independently calculated expectation. A passing example alone is not proof for every input. Empty, zero and malformed inputs need stated behavior.
  • PY4 · Run the downloadable Python workshop locally. The page retains notes, not executed Python. Imported or pasted code is inert text. The separate reproducibility module supplies a second, scientific comparison starter.
Worked illustration · fixed teaching values

Follow one order through the calculation

row 0 · column 02 itemsorders[0][0]
row 0 · column 13 credits/itemorders[0][1]
line total6 credits2 * 3

The first index selects a row; the second selects a column. A second row [4, 2] contributes 8 credits: the running subtotal goes 0 → 6 → 14. Add a two-credit delivery fee once, after both rows, to get 16.

A row [4] has no column 1. Reject it before multiplying; silently dropping it changes the order.

Read the code with the example

len returns the number of items. != means not equal. Validate a row before indexing it. This illustration assumes numeric inputs; the downloadable validator also rejects text, booleans, negative values and non-finite numbers. A rectangle of values still needs column names and units.

rows = [[2, 3], [4, 2]]
for row in rows:
    if len(row) != 2:
        raise ValueError("quantity and price required")
    print(row[0] * row[1])  # 6, then 8

Fixed worked example, not an in-browser interpreter. Predict a changed input before running your own saved file.

Worked example

[[2, 3], [4, 2]] has shape 2 × 2 and total 2 × 3 + 4 × 2 = 14. A row [4] has no price, so the supplied validator rejects it. Swapping columns preserves shape but changes interpretation; labels must travel with values.

Check the boundary

A rectangular table may still mix units, swap meanings or contain invalid values. Do not silently discard rejected rows: that changes the population represented by the reported total.