以下哪个表达式的值等于3?
A: round(2.5)
B: math.floor(2.5)
C: math.ceil(2.5)
D: decimal.Decimal("2.5")
A: round(2.5)
B: math.floor(2.5)
C: math.ceil(2.5)
D: decimal.Decimal("2.5")
举一反三
- 以下哪个表达式的值等于3? A: round(2.5) B: math.floor(2.5) C: math.ceil(2.5) D: decimal.Decimal("2.5")
- 以下哪个表达式的值等于3? A: round(2.5) B: math.floor(2.5) C: math.ceil(2.5) D: decimal.Decimal("2.5")
- Math对象的哪个方法可以返回小于等于参数的整数?() A: round() B: pow() C: floor() D: ceil()
- 下列表达式运算结果为真的是( )。 A: int(2.5)=3 B: int(2.5)=2 C: int(2.5)=2.5 D: int(2.5)=0.5
- Math对象有3个取整函数分别是 floor、round、ceil。