Last time, we explored basic math operations like +
, -
, *
, and /
in Python.
We also saw that *
and /
usually happen before +
and -
.
Engagement Message
So, in 5 + 2 * 3
, which part is calculated first?
As programs get longer, it's helpful to leave notes inside the code. These notes are for humans reading the code, not for the computer.
Engagement Message
Think of them like sticky notes explaining what a part of your program does. Make sense?
In Python, you can write these notes, called comments, by starting a line with the hash symbol (#
).
Anything on a line after a #
is completely ignored by the computer when you run the code.
Engagement Message
Can you write for me a simple one word comment?
