Skip to content
Snippets Groups Projects

test

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by u5501887

    test

    snippetfile1.txt 679 B
    class Person:
        def __init__(self, name, address, phone):
            self.name = name
            self.address = address
            self.phone = phone
    
    class Customer(Person):
        def __init__(self, name, address, phone, customer_number, mailing_list):
            Person.__init__(self, name, address, phone)
            self.customer_number = customer_number
            self.mailing_list = mailing_list
    
    def main():
        customer1 = Customer('James Finch', '123 warwick road', '1234567890', '12345', 'Yes')
        print(customer1.name)
        print(customer1.address)
        print(customer1.phone)
        print(customer1.customer_number)
        print(customer1.mailing_list)
    
    if __name__ == '__main__':
        main()
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment