Added codes for logic chapter