본문 바로가기 메뉴 바로가기

Dongi_coding 동기_코딩

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Dongi_coding 동기_코딩

검색하기 폼
  • 분류 전체보기 (345)
    • JSP (0)
    • GitHub (0)
    • Java (23)
    • 리눅스 (1)
    • HTML & CSS (29)
    • 연습 (0)
    • HTML (47)
    • Python (82)
    • Markdown (2)
    • Flask (1)
    • Web_internet (1)
    • JavaScript (58)
    • CSS (51)
    • TypeScript (45)
    • 프로그래머스 코딩테스트 (3)
    • Computer Science (2)
  • 방명록

파이썬 클래스 던더 메서드 (1)
[Python] 클래스 생성자

안녕하세요 동기 여러분! 오늘은 클래스의 생성자(constructor)에 대해 알아봅시다! 클래스 생성자(constructor) class Area: def settings(self, width, height): self.width = width self.height = height def triangle(self): area = self.width * self.height / 2 return area def square(self): area = self.width * self.height return area area_1 = Area() area_2 = Area() area_1.settings(5, 8) area_2.settings(3, 7) print(area_1.triangle(), area_1.s..

Python 2022. 2. 18. 10:12
이전 1 다음
이전 다음
공지사항
  • 동기 코딩 연락처
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Python
  • Margin
  • HTML 기본
  • 반복문
  • Object
  • em
  • Typescript
  • 객체
  • 동기코딩
  • html
  • Type
  • 파이썬
  • Array
  • function
  • html table
  • if문
  • javascript
  • method
  • 타입스크립트
  • 자바스크립트
  • CSS 포지션
  • padding
  • 함수
  • 타입 좁히기
  • for문
  • 메서드
  • 프로그래머스
  • 실수
  • css position
  • CSS
more
«   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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바