The dictionary hints don't tell you that "compito/i" means "homework".
Pretty sure that "compito" can be simply "task" as well, and "compito di casa" is the one that means only "homework".
Yes. There is a sentence il compito (the task). I guess the plural means/can mean homework