Mathematics I / Variables, Types, and Expressions
Practice question · Match the pairs

Match each data type to its defining property.

  • Integer
  • Float
  • Boolean
  • String
  • Text, which + joins rather than adds
  • One of exactly two values, true or false
  • Numbers with a fractional part, stored approximately
  • Whole numbers, stored exactly
Hints
  1. Only one of these types is described as approximate.
  2. One type has exactly two possible values in the whole language.
Show the answer
  • Integer Whole numbers, stored exactly
  • Float Numbers with a fractional part, stored approximately
  • Boolean One of exactly two values, true or false
  • String Text, which + joins rather than adds
Why

Exactness is what separates integers from floats, and it is why counting is safe in integers but accumulating fractions is not. Booleans carry the verdicts that conditions produce, and strings are the type on which + changes meaning.

Read the lesson: Variables, Types, and Expressions →

Practise Variables, Types, and Expressions

The app has 4 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.

More questions on Variables, Types, and Expressions