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
- Linux
- SSH
- Python
- Visual Studio
- LIST
- 오류
- Docker
- YOLO
- label
- C++
- windows forms
- C
- 컨테이너
- ubuntu
- 핑거스타일
- Numpy
- pytorch
- VS Code
- Selenium
- C#
- pandas
- 채보
- mysql
- 프로그래머스
- JSON
- error
- 기타 연주
- pip
- OpenCV
- paramiko
Archives
- Today
- Total
목록제한 (1)
기계는 거짓말하지 않는다
Python 소수점 제한, 출력
number = 3.141592 number2 = 10.7562149 # round 반올림 print(round(number, 2)) # 3.14 print(round(number)) # 3 print(round(number2)) # 11 number = round(number, 3) print(number) # 3.142 # 출력 시 제한 print(f"{number2:.2f}") # 10.76 print("{:.4f}, {:.5f}".format(number2, number2)) # 10.7562, 10.75621
Python
2022. 5. 8. 13:18