파이썬 math.log10() 메서드
예시
다른 숫자의 밑이 10인 로그 찾기
# Import math Library
import math
# Return the base-10 logarithm
of different numbers
print(math.log10(2.7183))
print(math.log10(2))
print(math.log10(1))
정의 및 사용
이 math.log10()
메서드는 숫자의 밑이 10인 로그를 반환합니다.
통사론
math.log10(x)
매개변수 값
Parameter | Description |
---|---|
x | Required. Specifies the value to calculate the logarithm for. If the value is 0 or a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
기술적 세부 사항
반환 값: | 숫자의 밑이 10인 로그를 나타내는 float 값 |
---|---|
파이썬 버전: | 2.3 |