본문 바로가기

IT관련정보/파이썬(Python)-Ver3.6.1

(3)
※파이썬 관련 셋팅 ※파이썬 관련 셋팅 1.파이썬 설치 3.7.1 (https://www.python.org/downloads/release/python-371/) 해당 경로에 있는 Windows x86-64 executable installer 클릭해서 python-3.6.1-amd64.exe 파일 다운로드 다운로드 완료되면 실행 빨간줄(Add Python 3.7 to PATH) 체크하고 Install Now 클릭 완료. 확인작업으로 cmd -> python입력해본다. 다음과 같은 화면이 나오면 설치완료 2.아나콘다 설치(https://www.anaconda.com/download/#windows) :데이터 분석에 유용한 라이브러리가 많이 포함된 배포판(data science platform) 해당 경로에 있는 Pytho..
※클래스(변수와메서드) ※클래스(변수와메서드) class Rectangle: count = 0 # 클래스 변수 def __init__(self, width, height): self.width = width #인스턴스 변수 self.height = height Rectangle.count += 1 # 인스턴스 메서드 def calcArea(self): area = self.width * self.height return area # 정적 메서드 @staticmethod def isSquare(rectWidth, rectHeight): return rectWidth == rectHeight # 클래스 메서드 @classmethod def printCount(cls): print(cls.count) 1)클래스 변수 : 클래스 내부..
※변수명 규칙 ※변수명 규칙 대표적인 변수표기법 3가지가 있다. 1.카멜표기법 :각 단어의 첫문자를 대문자로 표기하고 붙여쓰되, 맨처음 문자는 소문자로 표기함(camelCase) 2.파스칼표기법 :첫 단어를 대문자로 시작하는 표기법(PascalCase) 3.스네이크표기법 :단어를 밑줄문자로 구분하는 표기법(snake_case & SNAKE_CASE) ORACLE(스네이크표기법) TABLE - ACT_INV_MST,ACT_INV_DTL FUNCTION - UFN_* PROCEDURE - USP_* MSSQL(파스칼표기법) TABLE - ActInvMst,ActInvDtl FUNCTION - Ufn* PROCEDURE - Usp* ---------------------------------------------------..