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 |
Tags
- 리눅스 명령어
- 코딩테스트
- Python 라이브러리
- Oracle
- it 용어
- csharp
- C#
- 데이터베이스
- linux
- VirtualBox
- sql
- python algorithm
- 파이썬 알고리즘
- Algorithm
- 알고리즘
- Python DataFrame
- PYTHON
- 파이썬 데이터프레임
- 리눅스
- RFP
- 파이썬
- it용어
- Oracle VM VirtualBox
- 파이썬 전처리
- putty
- dbeaver
- MariaDB
- HTML
- tibero
- 오라클
Archives
- Today
- Total
오경석의 개발노트
Python 알고리즘_절댓값 구하기 본문
# algorithm_1(부호 판단)
def abs_sign(n):
if n >= 0:
return n
else:
return -n
# algorithm_2(제곱-제곱근)
import math
def abs_square(n):
b = n * n
return math.sqrt(b) # 수학 모듈의 제곱근 함수
'알고리즘 > Python 알고리즘' 카테고리의 다른 글
Python 알고리즘_리스트 최솟값 구하기 (0) | 2022.11.14 |
---|---|
Python 알고리즘_리스트 최댓값 구하기 (0) | 2022.11.14 |
Python 알고리즘_리스트 최댓값의 위치 구하기 (0) | 2022.11.14 |
Python 알고리즘_1부터 n까지 연속한 숫자의 제곱의 합 (0) | 2022.11.13 |
Python 알고리즘_1부터 n까지의 합 구하기 (0) | 2022.11.09 |
Comments