python 整数最大
The greatest integer function is a function (real numbers function) to itself that is defined as follows: it sends any real number to the largest integer that is less than or equal to it.
最大整数函数是一个对其自身定义的函数(实数函数),其定义如下:它将任何实数发送到小于或等于该整数的最大整数。
The greatest integer function of
的最大整数函数
The greatest integer function is related to the fractional part (sometimes denoted
最大整数函数与小数部分 (有时表示为
More about greatest integer function: floor() and ceiling functions | wikipedia
有关最大整数函数的更多信息: floor()和ceiling函数| 维基百科
Python代码查找最大整数(使用floor()方法) (Python code to find greatest integer (Use of floor() method))
# Python code to find greatest integer
# (Use of floor() method)
import math #importing class
num = float(input("Enter any float number: "))
print("math.floor(num): ", math.floor(num))
num = float(input("Enter another float number: "))
print("math.floor(num): ", math.floor(num))
Output
输出量
Enter any float number: 56.892
math.floor(num): 56
Enter another float number: -34.567
math.floor(num): -35
翻译自: https://www.includehelp.com/python/find-greatest-integer-using-floor-method.aspx
python 整数最大