파이썬 round()

1 개요[ | ]

Python round()
파이썬 round()
print( round(3.14159, 2) )  # 3.14

print( round(7.4) ) # 7
print( round(7.5) ) # 8
print( round(7.6) ) # 8

print( round(7, 0) )      # 7
print( round(7, 1) )      # 7
print( round(7, 2) )      # 7

print( round(7.7, 0) )      # 8.0
print( round(7.7, 1) )      # 7.7
print( round(7.7, 2) )      # 7.7

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}