UserDonghu's Note

  • 홈
  • 태그
  • 방명록

Python 22

Python(2) 숫자 자료형

정수 (int) 진수 : 수를 표현하는 방법 2진수 : 0 1 8진수 : 0 1 2 3 4 5 6 7 16진수 : 0 1 2 3 4 5 6 7 8 9 a b c d e f 10진수 731 = 7 * 10^2 + 3 * 10^1 + 1 * 10^0 2진수 110 = 1 2^2 + 1 * 2^1 + 0 * 2^0 쉽게 계산하는 법 10진수 15를 2진수로 표현하면? 16이 2의 5승이므로 10000 -1 == 1111 # 2진수 x = 0b110 print(x) # 6 print(type(x))# # 8진수 x = 0o110 print(x) # 72 print(type(x)) # # 16진수 x = 0x110 print(x) # 272 print(type(x)) # bin(15) # '0b1111' oct(..

Python 2023.09.08

Python(1) 시작

파이썬은 조금 공부를 하였기 때문에 블로그에는 내가 몰랐던 부분 혹은 헷갈리는 부분만 정리. https://colab.research.google.com/drive/19o3KXnRPZeeW73emy73nApBwI2emS3Sr?usp=sharing 주석 # 한줄 주석 ''' 여러줄 주석 입니다 ''' 출력 x = 'hello' print(x, x, sep='-') # hello-hello print('010', '0000', '1000', sep='-') # 010-0000-1000 print('010', '0000', '1000', end='-') print('Hello World', end='~') # 010 0000 1000-Hello World~ 변수 x = 10 y = x z = y x = 20 ..

Python 2023.09.08
이전
1 2 3
다음
더보기
프로필사진

UserDonghu's Note

락스타가 되고싶다

  • 전체보기 (102)
    • HTML&CSS (16)
      • HTML (6)
      • CSS (10)
    • JS (16)
    • Python (22)
    • Algorithm&CodingTest (4)
      • Algorithm (4)
      • CodingTest (0)
    • Django (20)
      • DRF (6)
    • FastAPI (1)
    • HTTP (0)
    • SQL (1)
    • ERD (0)
    • AWS (2)
    • Git (2)
    • 기타 (4)
      • VSC (3)
    • 나의 일상 (8)

Calendar

«   2025/09   »
일 월 화 수 목 금 토
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
https://github.com/UserDongHu

티스토리툴바