print(1/2)
結果:0
print(1.0/2.0)
結果 : 0.5
割り算をする場合、int型の数値を割ると、結果は勝手にint型にキャストされる。小数点を得るには、float型として割る必要がある。
print(float(1)/float(2))