Created
February 27, 2013 16:30
-
-
Save jjangdm/5049275 to your computer and use it in GitHub Desktop.
class_example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Accounts(object): | |
accountNumber = 0 | |
def __int__(self, name, balance): | |
self.name = name | |
self.balance = balance | |
Accounts.accountNumber += 1 | |
def withdraw(self, atm): | |
self.balance = self.balance - atm | |
return self.balance | |
def deposit(self, atm): | |
self.balance = self.balance + atm | |
return self.balance | |
def inquiry(self): | |
return self.balance |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment