算数运算符

二元运算符:+(加) -(减) *(乘) /(除) ^(幂) %(取余)

一元运算符:-(负)

a = 10
b = 7
print(a + b)        --> 17
print(a - b)        --> 3
print(a * b)        --> 70
print(a / b)        --> 1.4285714285714
print(a ^ b)        --> 10000000
print(a % b)        --> 3
print(-a)           --> -10

results matching ""

    No results matching ""