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
- PyQt
- javascript
- mssql
- python
- ubuntu
- 라즈베리파이
- 맛집
- MS-SQL
- flutter
- urllib
- 다이어트
- Linux
- GIT
- tensorflow
- Unity
- IOS
- swift
- Excel
- PyQt5
- PER
- ASP
- 날짜
- MySQL
- pandas
- 함수
- port
- 유니티
- sqlite
- 리눅스
- node.js
Archives
아미(아름다운미소)
python round를 이용한 소수점 반올림 본문
파이썬에서 round를 이용한 소수점 반올림
print(round(3.4444))
결과 : 3.0
print(round(3.4444, 2)) 결과 : 3.44
print(round(3.5)) 결과 : 4.0
print(round(3.5555, 2)) 결과 : 3.56
print('%.2f' % 2.555) 결과 : 2.56
print(round(3.4444, 2)) 결과 : 3.44
print(round(3.5)) 결과 : 4.0
print(round(3.5555, 2)) 결과 : 3.56
print('%.2f' % 2.555) 결과 : 2.56
'랭귀지 > python' 카테고리의 다른 글
pyqt spinbox set value (0) | 2018.11.13 |
---|---|
파이썬 스케줄러를 지속적으로 돌리기위한 방법{python threading} (0) | 2018.11.12 |
not all arguments converted during string formatting (0) | 2018.11.10 |
pymysql 설치 및 사용 (0) | 2018.11.09 |
판다(pandas)를 사용하여 현재 시간을 얻는 방법 (0) | 2018.11.08 |
Comments