python programs using classes and methods