logic homework