목록파이썬 (14)
따릉이

1. postgresql 설치 및 데이터베이스 생성:https://yuda.dev/282 pgadmin 검색 > 실행 - 설치 시 저.." data-og-host="yuda.dev" data-og-source-url="https://yuda.dev/282" data-og-url="https://yuda.dev/282" data-og-image="https://scrap.kakaocdn.net/dn/eFx4S/hyKWH8klxn/WERx4ZkfsHKaqvbCYw6an1/img.png?width=800&height=394&face=0_0_800_394,https://scrap.kakaocdn.net/dn/bARxtr/hyKWGO62Tj/nr2JleQkTLF2ycEIk0kclk/img.png?width=800..
1. 기온, 풍속, 강수량, 습도 (최대 15일 예보, 1시간 단위)https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/ Timeline Weather API – Visual Crossing WeatherThe Timeline Weather API is the simplest and most powerful way to retrieve weather data. You can request data over any time window including windows that span the past, present, and future. The API will take care of the combi..
1. While Loops # while loop statement a = 10 while (a = 3): break a += 1 else: print('while - else') print() a = 1 while (a = 3): break a += 1 else: print('while..
1. Numeric Types a = 300# int (10진수) b = 10.12# float c = 10 + 2j# complex d = 0b1001# int (2진수) e = 0o1001# int (8진수) f = 0x1001# int (16진수) print(type(a)) # object a의 class 이름 출력 print(dir(a)) # object a의 attribute 목록 출력 ['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '..

1. 파일 읽기 read() 파일 읽기 read(10) 10 Byte 씩 읽기 readline() 한 줄씩 읽기 readlines() 전체를 읽고 한 줄씩 리스트로 저장 2. 파일 쓰기(write) , 파일 출력

1. 예외 처리 - try : 에러가 발생할 가능성이 있는 코드 실행 - except : 에러 처리 - else : 에러가 발생하지 않을 경우 실행 - finally : 항상 실행 1.1. 기본 예외 처리 방법 1.2. finally 활용 & raise (예외 직접 발생) 2. 내장 함수 , 외장 함수 2.1. 기본적인 내장함수 2.2. enumerate , map , filter 함수 2.3. range , sorted , sum , zip 함수 2.4. 외장함수

1. 모듈 1.1. 모듈 작성 - 모듈 : 함수, 변수, 클래스 등 파이썬 구성요소 등을 모아 놓은 파일 ① 모듈 작성 ② 모듈 사용 1.2. __name__ 사용 - 해당 모듈이 작성된 내에서만 작동하게 된다. - if __name__ == "__main"__: - 위와 동일하게 모듈을 호출하여 사용하였을 때, 모듈 내에 작성된 부분이 실행되지 않는다. 2. 패키지 2.1. 패키지 작성 - 파이썬은 패키지로 분할된 개별적인 모듈로 구성된다. - package1 구성 - __init__.py : 파이썬 3.3 이전 버전의 호환을 위해 작성 -> 패키지 인식을 위해 필요 - package2 구성 2.2. 패키지 사용 (3가지 방법)