class account(object)'' class for objects representing an account ''methods def withdraw(selfamount)self balance -amount def deposit(selfamount)self balance +amount def print_info(self)print("balance:"self balanceif __name__ ="__main__"annesacc account(annesacc balance annesacc deposit( annesacc withdraw( annesacc print_info(the methods deposit(selfamount)withdraw(selfamountand print info(selfare instance methods of the account class this means that they are designed to operate on objects that have been created from this class technicallyinstance methods are required to have first parameter which is called self (it could be called something elsetoobut self is very strong convention in pythonthe following image shows that we have an objectannesaccwhich is linked to the class account the balance attribute is only available at the particular objectbut the methods that have been defined in the class are available in the class we can call the class' methods 'on an objectusing the dot notationannesacc deposit( in the code written for the classhoweverthe method looks like thisdeposit(selfamountit has two parametersbut we called it only with one (amountso why is thatthe following happens herepython knows that annesacc is an object of the account class (because we created the object by calling the classpython executes the deposit(selfamountmethod of the account class and assigns the object on which the method was called to the self parameter this means that the following two lines of code are equivalent annesaccount deposit( account deposit(annesaccount annemarie friedrichcis lmu munchenws /