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
													
											
												
												- PER
- MySQL
- 유니티
- 함수
- urllib
- tensorflow
- Excel
- 리눅스
- 라즈베리파이
- flutter
- node.js
- javascript
- IOS
- python
- mssql
- swift
- ubuntu
- 맛집
- 다이어트
- PyQt5
- PyQt
- Unity
- sqlite
- port
- pandas
- 날짜
- Linux
- MS-SQL
- ASP
- GIT
													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