Expression is a data value or set of operations to compute a value.
Example :-
1+4*3
Arithmetic Operators we will use:-
| +-*/ | Addition, Subtraction/Negation, Multiplication, Division |
| % | Modules, a.k.a. Remainder |
| *** | Exponentiation |
etc.
Precedence:
Order in which operations are computed.
- * / % ** have a higher precedence than + and –
Example:- 1+3+4 is 13
- Parenthesis can be used to force a certain order of evalution.
Example:- (1+3)*4 is 16

2 thoughts on “Expressions of Python”