pythonds--start with logic gate, class inheritance