Challenge 1-2: Maths
Challenge 1-2: Maths
Maths Basics
Now it's time to start writing some instructions for computers!
The first thing you need to do is open a program called the Python Shell, which will allow you to start writing instructions. Open this link in a new tab to get access to the Shell: https://www.python.org/shell/
Let's get started with some very simple math.
Go ahead and type these expressions one at a time. After each one, hit the Enter key and see what happens.
>>> 1 + 2
>>> 12 - 3
>>> 9 + 5 - 15
We're using some symbols you already know - the plus and minus signs. In the programming world, we call these operators.
Operators
add +
subtract -
By the way, you have just started writing python!
Answers
>>> 1 + 2
3
>>> 12 - 3
11
>>> 9 + 5 - 15
-1