Introduction to Topological Manifolds - 2e (J.M. Lee), pg-46 ,Q-25.
For each of the following properties, give an example consisting of two subsets $X,Y \in \mathbb{R^2}$, both considered as a topological space with their Euclidian topologies, together with a map $f:X \to Y$ that has the indicated property.
(a) $f$ is open but neither closed nor continuous.
(b) $f$ is closed but neither open nor continuous.
(c) $f$ is continuous but neither open nor closed.
(d) $f$ is continuous and open but not closed.
(e) $f$ is continuous and closed but not open.
(f) $f$ is open and closed but not continuous.
During my attempt, I have come up with the following maps and spaces.
f) I define a map that divide an open disk $X \equiv B_r(0)$ in $\mathbb{R^2}$ into two parts for some $r'<r$ where all points that lies inside open ball of radius $r'$ are mapped to a one single point and rest to another single point. Then I define $Y$ to the space formed with those two points. It is clear $f$ is open and closed. Also, the inverse image of second point is obviously not open in $X$. (I don't know how fair is merely considering two points in $\mathbb{R^2}$ pertaining to the spirit of this question)
e) I take the closed annulus between $1\leq r \leq 2$ and define the map in polar coordinates: $f(r)=r-1$. This is a quotient map that collapses the inner ring to a point and maps to $\bar{B}_1(0)$. Since Quotient maps are continuous, it is continuous. I think this map should be closed using the closed map lemma. A map from Compact space to a hausdorff spaces is closed. And I think it's not open because if we consider the sector of an annulus between two angles. The ring that collapses to a point doesn't allow the set to remain open in $\bar{B}_1(0)$.
d) I think a topological embedding would do in this case of any open ball into some bigger open ball.
But from this point onwards, I am getting worried that I am missing the big picture of this question. I think I am merely brute forcing the examples. Is there any general conception I am missing to generate such examples. Something thats's bit more intuititve to comprehend?