본문 바로가기

IT 세계의 후아

검색하기
IT 세계의 후아
프로필사진 후__아

  • 전체 (55)
    • Coding (43)
      • Python (27)
      • Study (15)
      • Algorithm (1)
    • Recording (12)
      • NewsScrap (10)
      • 취준기록 (0)
      • Etc (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
  • dict
  • langchain
  • 경제신문스크랩
  • Ord
  • listcomprehension
  • 랭체인
  • Python
  • 데이콘경진대회
  • 프로그래머스
  • 리스트
  • AI
  • 이중리스트
  • chr
  • 생성형AI
  • 파이썬
  • OpenAI
  • 문자열
  • rag
  • llm
  • 백준
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록round (1)

IT 세계의 후아

[python]소수점 자리수 round

round(값): 정수로 반올림round(값, 자리수n): 소수점 n자리수에서 반올림 # 프로그래머스 lv0 두 수의 나눗셈# 테스트 케이스 실패...def solution(num1, num2): return round((num1/num2)*1000) # 수정 후 return int((num1/num2)*1000) ※ int와 roundround: 반올림int: 정수로의 변환 - 소수점 이하 버림 ※ format, f-string"문자열 {1:.2f} ".format(실수1, 실수2) => 실수2를 소수점 둘째자리까지 출력f"문자열 {변수:.3f}" => 변수의 값을 소수점 셋째자리까지 출력 cf) https://blockdmask.tistory.com/534..

Coding/Python 2024. 4. 24. 14:25
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바