20210508 파이썬 기초문법/ 맥에서 웹개발 세팅
TIL
DONE
- 파이썬 클래스 기초문법(클래스, 상속, 오버라이딩)
- 클래스 선언
class Sum1: # class name
    def __init__(self,n1,n2): #construcor declared, param n1,n2
        self.n1=n1 #객체 변수 생헝
        self.n2=n2
        
    def add(self): # method in class
        result = self.n1 + self.n2
        return result
        
a = Sum1(10,20)
print(a.add())
- 상속, 오버라이딩
class gaesan:
    def __init__(self,n1,n2):
        self.n1 = n1
        self.n2 = n2
    def add(self):
        return self.n1 + self.n2
    def sub(self):
        return self.n1 - self.n2
    def mul(self):
        return self.n1 * self.n2
    def div(self):
        return self.n1/self.n2
    
class gaesanMore(gaesan): #(gaesan)을 부모 클래스로 상속
    def mul2(self):
        return self.n1**self.n2
        
        
class gaesanRe(gaesan): # 오버라이딩
    def div(self):
        if self.n2 == 0:
            print('error')
        else:
            return self.n1/self.n2
> a = gaesanMore(4,3)
> a.mul()
12
> a.mul2()
64
> a = gaesanRe(3,0)
> a.add()
3
> a.sub()
3
> a.div()
error
VCS 웹개발 세팅
Auto Close Tag - 자동으로 태그를 닫아주는 기능
Auto Rename Tag - 시작태그를 수정하면 종료태그를 같이 바꿔주는 기능
HTML Snippets - 효율적인 태그 작성을 도와주는 기능
Autoprefixer - 크로스 브라우징을 위해 접두사를 넣어주는 기능
Live Server - 로컬서버를 만들어 브라우저에서 실행되고 저장하면 바로 적용을 보여주는 기능 
                
                    
        
    
    
    
    
    
                
                
                
                
                    
                        
                            
                            
                            Author And Source
                            
                            이 문제에 관하여(20210508 파이썬 기초문법/ 맥에서 웹개발 세팅), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
                                
                                https://velog.io/@marintelli/20210508-파이썬-기초문법
                            
                            
                            
                                저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                            
                            
                                
                                
                                 우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)
                            
                            
                        
                    
                
                
                
            
- 파이썬 클래스 기초문법(클래스, 상속, 오버라이딩)
- 클래스 선언
class Sum1: # class name
    def __init__(self,n1,n2): #construcor declared, param n1,n2
        self.n1=n1 #객체 변수 생헝
        self.n2=n2
        
    def add(self): # method in class
        result = self.n1 + self.n2
        return result
        
a = Sum1(10,20)
print(a.add())- 상속, 오버라이딩
class gaesan:
    def __init__(self,n1,n2):
        self.n1 = n1
        self.n2 = n2
    def add(self):
        return self.n1 + self.n2
    def sub(self):
        return self.n1 - self.n2
    def mul(self):
        return self.n1 * self.n2
    def div(self):
        return self.n1/self.n2
    
class gaesanMore(gaesan): #(gaesan)을 부모 클래스로 상속
    def mul2(self):
        return self.n1**self.n2
        
        
class gaesanRe(gaesan): # 오버라이딩
    def div(self):
        if self.n2 == 0:
            print('error')
        else:
            return self.n1/self.n2> a = gaesanMore(4,3)
> a.mul()
12
> a.mul2()
64
> a = gaesanRe(3,0)
> a.add()
3
> a.sub()
3
> a.div()
errorVCS 웹개발 세팅
Auto Close Tag - 자동으로 태그를 닫아주는 기능
Auto Rename Tag - 시작태그를 수정하면 종료태그를 같이 바꿔주는 기능
HTML Snippets - 효율적인 태그 작성을 도와주는 기능
Autoprefixer - 크로스 브라우징을 위해 접두사를 넣어주는 기능
Live Server - 로컬서버를 만들어 브라우저에서 실행되고 저장하면 바로 적용을 보여주는 기능
Author And Source
이 문제에 관하여(20210508 파이썬 기초문법/ 맥에서 웹개발 세팅), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@marintelli/20210508-파이썬-기초문법저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)