• 회원가입
  • 로그인
  • 구글아이디로 로그인

[module] Python - math.pi 상수 - 원주율 (= 3.14...) 반환. (= 파이 상수)

4549  

목차

  1. math.pi 예제
  2. math.pi 정의
  3. math.pi 구문

 

math.pi 예제

 

import math

print (math.pi)

 

결과값: 3.141592653589793

 

math.pi 정의

 

pi 상수 (= 3.141592653589793) 반환.

 


 

※ pi (= 원주율) : 원의 지름에 대한 원주의 비율.

※ 수학적으로, pi는 π로 표현.

※ Python 1.4 이상.

  

PS. π 기호 입력법 : ㅎ 입력 > 한자키 > π 선택. > 바탕체로 변경. 

 

math.pi 구문

 

math.pi

 


[반환값]

 

3.141592653589793 반환.

※ pi (= 원주율).

※ float 자료형.

 



분류 제목
module Python - cmath 모듈 메서드・상수 종류 (※ 복소수 모듈)
module Python - cmath.acos(x) 메서드 -
module Python - cmath.acosh(x) 메서드 -
module Python - cmath.asin(x) 메서드 -
module Python - cmath.asinh(x) 메서드 -
module Python - cmath.atan(x) 메서드 -
module Python - cmath.atanh(x) 메서드 -
module Python - cmath.cos(x) 메서드 -
module Python - cmath.cosh(x) 메서드 -
module Python - cmath.exp(x) 메서드 -
module Python - cmath.isclose() 메서드 -
module Python - cmath.isfinite(x) 메서드 -
module Python - cmath.isinf(x) 메서드 -
module Python - cmath.isnan(x) 메서드 -
module Python - cmath.log() 메서드 -
module Python - cmath.log10() 메서드 -
module Python - cmath.phase() 메서드 -
module Python - cmath.polar() 메서드 -
module Python - cmath.rect() 메서드 -
module Python - cmath.sin(x) 메서드 -
22/24
목록
찾아주셔서 감사합니다. Since 2012