pythonの:算術演算子

610 ワード

#      
a = 9
b = 2

# :+, , ,a+b
print('a + b =',a + b)

# :-, , , ,a-b
print('a - b =',a - b)
print('b - a =',b - a)

# :*, , ,a*b
print('a * b =',a * b)

# :/, , a b,a/b
print('a / b =',a / b)

# :%, , ,b%a
print('b % a =',b % a)

# :**, , x y ,a**b
print('a ** b =',a ** b)

# ://, , ,a//b
print('a // b =',a // b)