def charge(selfprice)"""charge given price to the cardassuming sufficient credit limit return true if charge was processedfalse if charge was denied ""if charge would exceed limitif price self balance self limitreturn false cannot accept charge elseself balance +price return true def make payment(selfamount)"""process customer payment that reduces balance ""self balance -amount code fragment the conclusion of the creditcard class definition (continued from code fragment these methods are indented within the class definition we draw attention to the difference between the method signature as declared within the class versus that used by caller for examplefrom user' perspective we have seen that the get balance method takes zero parametersyet within the class definitionself is an explicit parameter likewisethe charge method is declared within the class having two parameters (self and price)even though this method is called with one parameterfor exampleas my card charge( the interpretter automatically binds the instance upon which the method is invoked to the self parameter the constructor user can create an instance of the creditcard class using syntax ascc creditcardjohn doe st bank internallythis results in call to the specially named init method that serves as the constructor of the class its primary responsibility is to establish the state of newly created credit card object with appropriate instance variables in the case of the creditcard classeach object maintains five instance variableswhich we namecustomerbankaccountlimitand balance the initial values for the first four of those five are provided as explicit parameters that are sent by the user when instantiating the credit cardand assigned within the body of the constructor for examplethe commandself customer customerassigns the instance variable self customer to the parameter customernote that because customer is unqualified on the right-hand sideit refers to the parameter in the local namespace