round() 함수는 지정된 소수점 수로 반올림된 부동 소수점 숫자를 반환합니다.
# integers인 경우 print(round(10)) # 부동소수점인 경우 print(round(10.7)) # 짝수 선택 print(round(5.5))
결과
10 11 6
11 python에서 에러가 발생한 후에도 코드 실행을 계속할 수 있는 방법
11 Python에서 exception이 생긴 라인 숫자값을 어떻게 구할 수 있나요?
13 Pytube 쓸 때 pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple 에러 해결방법
10 파이썬에서 현재 시간을 구하는 방법
13 python에서 에러가 생겨도 계속 실행하는 방법
© 2022 pinfo. All rights reserved.