Python Operators
Mathematical symbols such as + (plus) and - (minus) are referred to as operators because they perform calculations on the numbers in our equations. For example, when we say “4 + 2” aloud or input it into a calculator, we intend to add the numbers 4 and 2 together to obtain their sum, which is 6.
Python utilizes most of the same operators that you would encounter in a math class, including +, -, and parentheses ( ). However, some operators differ from what you may have learned in school. For instance, the multiplication operator is represented by an asterisk (*) instead of the traditional multiplication sign (×), and the division operator is represented by a forward slash (/) rather than the division symbol (÷). We will explore these operators in more detail in this section.
No comments:
Post a Comment