Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- function
- javascript
- instruction
- system
- html
- mysql
- data structure
- architecture
- github
- MIPS
- Pipelining
- Linux
- DATAPATH
- XML
- computer
- DS
- Class
- DB
- web
- for
- DoM
- Algorithm
- MacOS
- control
- php
- Java
- react
- python
- while
- CSS
Archives
- Today
- Total
YYYEJI
[Python] Math 모듈 본문
728x90
모듈(module)이란?
모듈이란 함수나 변수 또는 클래스를 모아 놓은 파일입니다.
Math 모듈을 이용하기 위해서는 math 모듈을 import 해줘야됩니다.
import math
import math
print(math.ceil(3.14)) # ceil function
print(math.floor(3.78)) # floor function
print(math.factorial(5)) # factorial
print(math.fabs(-3.14)) # -
print(math.pow(3, 2)) # power of
print(math.sqrt(25)) # square
print(math.sin(90)) # sine
print(math.cos(90)) # cosine
print(math.tan(90)) # tangent
◡̈
'Python' 카테고리의 다른 글
[Python] Random 모듈 (0) | 2022.11.03 |
---|---|
[Python] datetime 모듈 (0) | 2022.11.03 |
[Python] Pillow(PIL) 모듈 (0) | 2022.11.03 |
[Python] 파이썬 터틀(Turtle)이란? (0) | 2022.10.24 |
[Python] 튜플의 packing, unpacking 이해하기 (0) | 2022.10.13 |