+ : plus
- : minus
* : multiple
/ : divide
** : power
// : divide and floor
% : modulos
Evaluate the expressions below:
Evaluate the expressions below:
Expressions with comparisons operators are evaluated to True or False
== equal!= different>= greater or equal> greater<= less or equal< lessodd and it takes one integer argument nTrue if n is odd, False if n is evenArithmetic Operators:
(expressions...), **, *, /, //, %, +, -Comparison Operators:
==, !=, >=, >, <=, <Order of operations: arithmetic operators come before comparison operators.
Evaluation the expressions on your whiteboard and answer attendance questions on Gradescope.
(expressions...)
** : Exponentiation
*, /, //, % : Multiplication, Division, Floor Division and Remainder
+, - : Addition and subtraction
<, <=, >, >=, !=, == : Comparisons
not x : Boolean NOT
and : Boolean AND
or : Boolean OR
| Expression | Result |
|---|---|
| not True | False |
| not False | True |
| Expression | Result |
|---|---|
| True and True | True |
| False and True | False |
| True and False | False |
| False and False | False |
| Expression | Result |
|---|---|
| True or True | True |
| False or True | True |
| True or False | True |
| False or False | False |