TactivergeLite

Lite / Building Machines That Respond / Week 3

Week 3: Variables and data types

Term 1: Computational Thinking

This week you will

Lessons

  1. Variables that track a changing machine · about 30 min
    A robot adds speed × time to its distance fifty times a second. How does one variable keep track of all that?
  2. int, float, str and list · about 35 min
    A sensor file says "23.5". Add 0.4 and Python refuses. Why is a number in quotes not a number?
  3. Why 0.1 + 0.2 is not 0.3 · about 35 min
    Ask Python whether 0.1 + 0.2 == 0.3 and it says False. Is your computer broken?
← Week 2Week 4 →