Skip to content

Instantly share code, notes, and snippets.

@jjangdm
Created February 27, 2013 16:30
Show Gist options
  • Save jjangdm/5049275 to your computer and use it in GitHub Desktop.
Save jjangdm/5049275 to your computer and use it in GitHub Desktop.
class_example.py
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