1. 程式人生 > >unsupported operand type(s) for *: 'float' and 'decimal.Decimal'

unsupported operand type(s) for *: 'float' and 'decimal.Decimal'

unsupported operand type(s) for *: 'float' and 'decimal.Decimal'

co=round(co/2,3) 

co_aqi=AqiCommon.getIAQI(co,'co_hour')報錯

co_aqi=AqiCommon.getIAQI(0.3,'co_hour')可計算出IAQI值為3

 

float(round(co/2,2))