파이썬 튜토리얼

파이썬 홈 파이썬 소개 파이썬 시작하기 파이썬 구문 파이썬 주석 파이썬 변수 파이썬 데이터 유형 파이썬 숫자 파이썬 캐스팅 파이썬 문자열 파이썬 부울 파이썬 연산자 파이썬 목록 파이썬 튜플 파이썬 세트 파이썬 사전 파이썬 If...Else 파이썬 while 루프 Python For 루프 파이썬 함수 파이썬 람다 파이썬 배열 파이썬 클래스/객체 파이썬 상속 파이썬 반복자 파이썬 범위 파이썬 모듈 파이썬 날짜 파이썬 수학 파이썬 JSON 파이썬 정규식 파이썬 PIP 파이썬 시도...제외 파이썬 사용자 입력 파이썬 문자열 포맷

파일 처리

파이썬 파일 처리 파이썬 읽기 파일 Python 파일 쓰기/만들기 파이썬 파일 삭제

파이썬 모듈

넘파이 튜토리얼 팬더 연습 사이피 튜토리얼

파이썬 Matplotlib

Matplotlib 소개 Matplotlib 시작하기 Matplotlib 파이플로트 Matplotlib 플로팅 Matplotlib 마커 Matplotlib 라인 Matplotlib 레이블 Matplotlib 그리드 Matplotlib 서브플롯 Matplotlib 분산 Matplotlib 바 Matplotlib 히스토그램 Matplotlib 파이 차트

기계 학습

시작하기 평균 중앙값 모드 표준 편차 백분위수 데이터 배포 정규 데이터 분포 산포도 선형 회귀 다항식 회귀 다중 회귀 규모 훈련/시험 의사결정나무

파이썬 MySQL

MySQL 시작하기 MySQL 데이터베이스 생성 MySQL 테이블 생성 MySQL 삽입 MySQL 선택 MySQL 어디 MySQL 주문 기준 MySQL 삭제 MySQL 삭제 테이블 MySQL 업데이트 MySQL 제한 MySQL 조인

파이썬 몽고DB

몽고DB 시작하기 MongoDB 데이터베이스 생성 MongoDB 컬렉션 생성 몽고DB 삽입 몽고DB 찾기 몽고DB 쿼리 몽고DB 정렬 몽고DB 삭제 MongoDB 드롭 컬렉션 몽고DB 업데이트 몽고DB 제한

파이썬 참조

파이썬 개요 파이썬 내장 함수 파이썬 문자열 메서드 파이썬 목록 메서드 파이썬 사전 메서드 파이썬 튜플 메서드 파이썬 세트 메소드 파이썬 파일 메서드 파이썬 키워드 파이썬 예외 파이썬 용어집

모듈 참조

랜덤 모듈 요청 모듈 통계 모듈 수학 모듈 cMath 모듈

파이썬 사용법

목록 중복 제거 문자열 반전 두 개의 숫자 더하기

파이썬 예제

파이썬 예제 파이썬 컴파일러 파이썬 연습 파이썬 퀴즈 파이썬 인증서

파이썬 수학 모듈


파이썬 수학 모듈

Python에는 수학 작업에 사용할 수 있는 내장 모듈이 있습니다.

math모듈에는 일련의 메서드와 상수가 있습니다 .


수학 방법

Method Description
math.acos() Returns the arc cosine of a number
math.acosh() Returns the inverse hyperbolic cosine of a number
math.asin() Returns the arc sine of a number
math.asinh() Returns the inverse hyperbolic sine of a number
math.atan() Returns the arc tangent of a number in radians
math.atan2() Returns the arc tangent of y/x in radians
math.atanh() Returns the inverse hyperbolic tangent of a number
math.ceil() Rounds a number up to the nearest integer
math.comb() Returns the number of ways to choose k items from n items without repetition and order
math.copysign() Returns a float consisting of the value of the first parameter and the sign of the second parameter
math.cos() Returns the cosine of a number
math.cosh() Returns the hyperbolic cosine of a number
math.degrees() Converts an angle from radians to degrees
math.dist() Returns the Euclidean distance between two points (p and q), where p and q are the coordinates of that point
math.erf() Returns the error function of a number
math.erfc() Returns the complementary error function of a number
math.exp() Returns E raised to the power of x
math.expm1() Returns Ex - 1
math.fabs() Returns the absolute value of a number
math.factorial() Returns the factorial of a number
math.floor() Rounds a number down to the nearest integer
math.fmod() Returns the remainder of x/y
math.frexp() Returns the mantissa and the exponent, of a specified number
math.fsum() Returns the sum of all items in any iterable (tuples, arrays, lists, etc.)
math.gamma() Returns the gamma function at x
math.gcd() Returns the greatest common divisor of two integers
math.hypot() Returns the Euclidean norm
math.isclose() Checks whether two values are close to each other, or not
math.isfinite() Checks whether a number is finite or not
math.isinf() Checks whether a number is infinite or not
math.isnan() Checks whether a value is NaN (not a number) or not
math.isqrt() Rounds a square root number downwards to the nearest integer
math.ldexp() Returns the inverse of math.frexp() which is x * (2**i) of the given numbers x and i
math.lgamma() Returns the log gamma value of x
math.log() Returns the natural logarithm of a number, or the logarithm of number to base
math.log10() Returns the base-10 logarithm of x
math.log1p() Returns the natural logarithm of 1+x
math.log2() Returns the base-2 logarithm of x
math.perm() Returns the number of ways to choose k items from n items with order and without repetition
math.pow() Returns the value of x to the power of y
math.prod() Returns the product of all the elements in an iterable
math.radians() Converts a degree value into radians
math.remainder() Returns the closest value that can make numerator completely divisible by the denominator
math.sin() Returns the sine of a number
math.sinh() Returns the hyperbolic sine of a number
math.sqrt() Returns the square root of a number
math.tan() Returns the tangent of a number
math.tanh() Returns the hyperbolic tangent of a number
math.trunc() Returns the truncated integer parts of a number

수학 상수

Constant Description
math.e Returns Euler's number (2.7182...)
math.inf Returns a floating-point positive infinity
math.nan Returns a floating-point NaN (Not a Number) value
math.pi Returns PI (3.1415...)
math.tau Returns tau (6.2831...)