Mathematics I / Variables, Types, and Expressions
Practice question · Select all that apply

Select every statement that is TRUE.

Hints
  1. Two options restate misconceptions the lesson explicitly warns against.
  2. One concerns what assignment means; the other concerns exact equality of floats.
Show the answer
  • A. Two floats should be compared by checking their difference is smaller than a small tolerance
  • C. Multiplication binds more tightly than addition
  • D. The symbol + can mean addition or text-joining depending on the operand types
Why

Assignment is a command, not an equality claim, and floats are approximate, so options 1 and 3 are false. The type-dependence of +, the precedence of *, and tolerance-based comparison are all exactly as taught.

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