Knaph

Data Types

Map

Arrows point from what you learn first to what it opens. Point at a concept to light up its chain and where it comes back deeper. Right-click a concept (or press and hold it) for its lessons and stories.

  • Proven to depth123+
  • Open
  • Locked
  • Comes back deeper

Learning path

In the order the concepts build on each other.

  1. Floating-point numbersLockedNumbers with a decimal point, stored in binary with about 16 significant digits - right for measuring, but slightly off for most decimal fractions, so never compared with ==.Opens after: Accumulator pattern
  2. NoneLockedPython's single value for "no value", what a function gives back when it returns nothing, and what you test with is None.Opens after: Exceptions, Return values
  3. PointersLockedValues that hold the memory address of another value, letting code refer to and modify that value indirectly.Opens after: Variables in code, Functions in code
  4. Basic typesLockedThe kinds of values a language has built in - integers, floating-point numbers, booleans, strings - and what you can do with each.Opens after: Floating-point numbers
  5. Character encodingLockedHow text is stored as numbers - every character has a code (Unicode), and an encoding such as UTF-8 turns those codes into bytes - so programs can share text.Opens after: Basic types
  6. StringsLockedText as a value - a row of characters you can count, index, slice, search and build, but never change in place.Opens after: Character encoding
  7. Type conversionLockedTurning a value of one type into another - text a user typed into a number with int or float, a number into text with str - since a language like Python won't do it by guessing.Opens after: Strings

Connections to other domains