Logic related external exercises

Solve: