말하는대로

  • 홈
  • 태그
  • 방명록

example 1

Class 예제 (1) - 은행 계정 클래스

다음 두 가지 특성, 두가지 메서드를 가진 은행 계정 클래스를 만드십시오. -Attirbutes -owner ( 예금주 ) -balance ( 예금액 ) -Method -deposit (입금 기능) -withdraw (출금 기능) 추가적으로 , 인출은 사용가능한 예금액을 초과할 수 없습니다. class Account: def __init__(self, owner, balance = 0): self.owner = owner self.balance = balance #입금 메서드 def deposit(self,cash): self.balance += cash print(f'{cash}원이 입금 되었습니다. 현재 잔액은 {self.balance}원 입니다.') #출금 메서드 def withdraw(self,c..

Python 2022.05.17
이전
1
다음
더보기
반응형
프로필사진

말하는대로

순간을 후회로 남지않게

  • 분류 전체보기 (79)
    • Python (53)
      • Django (3)
      • algorithm (38)
      • FastAPI (0)
      • core (2)
    • AI (1)
    • Data (3)
    • CS (7)
      • Network (1)
      • 운영체제 (1)
    • Infra (4)
      • GCP (2)
      • CICD (0)
    • etc (3)
    • App (2)
      • Android (1)
      • iOS (1)
      • etc (0)
    • gekco (1)
    • LostArk (0)
    • DesignPattern (1)
    • Project (1)
      • QnA_With_Your_Sentiment (1)
    • Devops (2)

Tag

알고리즘, DB, class, Gecko, 파이썬, Python, Algorithm, django, leetcode, list, CS, Til, 크레스티드게코, 게코, 백준, 항해, SQL, reptile, OOP, 파충류,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/11   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바