Skip to main content
PProfileMatch
← Path

Python Fundamentals · Python Syntax, Variables and Data Types for Beginners

0 XP
  1. 1 current stop: learning
  2. 2 upcoming
  3. 3 upcoming
  4. 4 upcoming
  5. 5 upcoming

Finish after stop 5

Stop 1 of 5 · Bike shop: pumping the tyres

Trick to keep in mind+3 XP

Binary can't write 0.1 exactly, just as decimal can't write 1/3 exactly

Computers store floats in base 2. A fraction like 0.1 repeats forever in binary, so only its nearest neighbour is stored, and tiny errors show up when you add values or test them for equality. Compare floats with a tolerance (math.isclose), and reach for Decimal when exact decimal digits matter.

Read it once, then a question tests whether the trick stuck.