반응형
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 |
Tags
- string
- Redshift
- 파이썬
- Tkinter
- PANDAS
- Java
- Apache
- Excel
- PostgreSQL
- google apps script
- GIT
- PySpark
- SQL
- Google Excel
- Google Spreadsheet
- gas
- c#
- matplotlib
- Github
- list
- numpy
- hive
- math
- dataframe
- array
- Kotlin
- Python
- django
- Mac
Archives
- Today
- Total
목록제곱 (1)
달나라 노트
Python math : pow() (거듭제곱, power)
math library의 pow() method는 거듭제곱의 결과를 return합니다. Syntax math.pow(x, y) x, y는 숫자입니다. pow() method는 x^y 의 결과를 return합니다. 예시를 봅시다. import math print(math.pow(2, 3)) print(math.pow(10, 4)) -- Result 8.0 10000.0 - math.pow(2, 3) 2^3의 결과는 8이므로 8이 return됩니다. - math.pow(10, 4) 10^4의 결과는 10000이므로 10000이 return됩니다. return값을 보면 8.0, 10000.0으로 모두 float type으로 return됩니다.
Python/Python math
2022. 11. 8. 20:25