The python arithmetic operators +, -, *, /, //,%, **

For example, a = 5, b = 2

Adding two objects + a + b = 7

- two objects subtract ab = 3

* Two objects multiplication a * b = 10

/ Two divided by the number of results (to) a / b = 2.5

// rounding (supplier returns the integer part of (two divided by the number after rounding down )) a // b = 2 -9 // 2 = -5

% Remainder of the division of two numbers a% b = 1

** a how much power a ** b = 25

Guess you like

Origin www.cnblogs.com/mihoutao/p/11770721.html