一math.ceil(x). import math. 1、當x為正數時,只要x的小數部分>0就+1. x=5.01. print(math.ceil(x)) #6. x=5.9. print(maht.ceil(x)) #6.
確定! 回上一頁