Anyone Can Code.
Operator | Operation |
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
% | Remainder |
// | Floor Division: rounds down to nearest integer |
** | Exponent |
Let's take a look at all of these in action.
x= 2 y= 5 print (x+y) print (x-y) print (x*y) print (x/y) print (x%y) print (y//x) print (x**y)
7 -3 10 0.4 2 2 32
Here's a graphic for a quick recap:
That's it for this tutorial! Click Next to access the next tutorial!
This site uses cookies to improve your experience as well as for site metrics. To see more, check out our Privacy Policy