Thinking Like a Computer

Did you know that computers can actually only think in numbers? Not words or code blocks. The code blocks are mostly for us to know what we’re telling the robot. The “translation” can take a bit of time; that’s why sometimes it takes awhile for the “Program Edison” button in the pop-up to show up [1 p. 186].

As you continue your journey in coding and robotics you will learn more about how numbers and math (yes math!) can be used to get your computer or robot to do many different things. One way to use numbers with coding blocks is using something called an expression. Think of an expression as a question that can be evaluated and resolved as being either true or false. In order to do this we have to apply our computational thinking (thinking like a computer). 

Edison or any computer evaluates an expression by deciding whether it is true or false.  

For example:

ExpressionEdison processes it as:
A = BIs A the same as B?
A ≠ BIs A not equal to B?
A > BIs A greater than B?
A >= BIs A greater than or equal to B?
A < BIs A less than B? 
A <= BIs A less than or equal to B?
[1 p. 187]

When using expressions- think like a computer! Instead of worrying about an exact value, you just need to determine if the answer is true or false. 


Kennewell and Peng [2 p. 126] explain:

The primary focus of this lesson is variables and data, two of the most fundamentally important parts of general purpose programming languages. It’s not uncommon for students (and instructors!) to feel like there is a bit of a stretch between prior units and the contents of this lesson, especially if this is your first time working with variables. Learning about variables and maths in programming is an important step in meaningful computer science education. Just like anything that is brand new, becoming comfortable with maths and variables in programs can take some time. Encourage students to be patient with themselves as they work through the activities. They will soon see the creative potential these new skills unlock inside programming!