python programs using only classes and methods