import math ##math.log(m,n) 以n为底m的对数 a = (8/17)*math.log((8/17),2)+(9/17)*math.log((9/17),2) print(-a)