1june

  • 홈

Python 11

Python Crash Course: 챕터 9

ClassesMaking an object from a class is called instantiation, and you work with instances of a class.class Dog: """A simple attempt to model a dog.""" def __init__(self, name, age): """Initialize name and age attributes.""" self.name = name self.age = age def sit(self): """Simulate a dog sitting in response to a command.""" print(f"{self.name} is now s..

Python/Python Crash Course 2024.07.01

Python Crash Course: 챕터 8

functiondef favorite_book(title): """Display a message about someone's favorite book.""" print(f"{title} is one of my favorite books.")favorite_book('The Abstract Wild')Start with defGive a variable with parentheses (parameter), and end with colonExplain the function in triple quotesWrite a code about what the function doesCall the function with arguement in parentheses functions are named..

Python/Python Crash Course 2024.07.01
이전
1 2 3 4 5 6
다음
더보기
프로필사진

1june

summarised what I have learned 배운 내용 정리

  • 전체 글 (11)
    • Python (11)
      • Python Crash Course (11)
      • Side Projects (0)

티스토리툴바

개인정보

  • 티스토리 홈
  • 포럼
  • 로그인

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.