Python 算数运算

Python的数学运算
 
print(1+2)#加法
#3
print(1-2)#减法
#-1
print(1*2)#乘法
#2
print(1/2)#除法
#0.5
print(2**4)#幂运算 2的4次
#16
print(10%3)#取余数
#1
print(10//3)#取整数
#3

猜你喜欢

转载自www.cnblogs.com/gancai/p/11914657.html