[Python] 2.14 & 2.15 Study Notes OPERATORS AND EXPRESSIONS

Too cool, stay up late can enjoy today, tomorrow, not in class, you can learn a whole day \ (Python \)

Operators

\ (+, -, *,% \) did not say, and say a few \ (c \) is not the same

division

print( 5/3 )

Output \ (1.66666 ... 7 \)
can be found in \ (Python \) , the division is not divisible, it will return a float

Divisible

\ (// \) is equivalent to \ (C \) in the \ (/ \)
do division and rounding down

print( 7 // 3 )

The return value is \ (2 \)

Exponentiation

\ (* \) , Exponentiation, effects, and \ (pow () \) as

print( 5 ** 3 )

Return \ (125 \)

Guess you like

Origin www.cnblogs.com/with6676/p/12315496.html