"floor division" or integer division

floor() 函数, round函数,// , %

m = math.floor(total_cm / 100)
quot, rem = divmod(7,3)
In [10]: quot,rem
Out[10]: (2, 1)

保留两位小数

round(sth,2)

results matching ""

    No results matching ""