[Python] 숫자처리함수


[Python] 숫자처리함수

숫자처리함수 절대값 print(abs(-5)) print(abs(5)) >>> 5 제곱근 print(pow(4, 2)) >>> 4*4 = 16 OR 4**4 = 16 최대값 print(max(5, 12)) >>> 12 최소값 print(min(5, 12)) >>> 5 반올림 print(round(3.14)) >>> 3 print(round(4.99)) >>> 5 math 임포트 하기 "math" 내장 함수 from math import * dir(math) >>> [ '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'e', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', ...


#from #최소값 #최대값 #제곱근 #절대값 #반올림 #python #math #import #파이썬

원문링크 : [Python] 숫자처리함수