A function that is both open and closed but not continuous This does not have to be a very extravagant example just something that I can wrap my head around to have a concrete idea. 
I was thinking that this could be satisfied by the function
$f: [0, 2\pi) \rightarrow B_1 = \{(x,y): x^2 + y^2 = 1\}$
$$
f(x) = (\cos(x),\sin(x))
$$
The point of discontinuity is obviously at $(1,0)$. 
I was hoping to get a little help convincing myself that this is both an open and closed mapping. (Still getting use to the definition). So, my definition as stated follows. 
Let $f:X \rightarrow Y$ be a function on the indicated spaces. Then $f$ is an $\bf{open}$ $\bf{function}$ or $\bf{open}$ $\bf{mapping}$ if for each open set $O$ in $X$, $f(O)$ is open in $Y$. The function $f$ is a $\bf{closed}$ $\bf{function}$ or $\bf{closed}$ $\bf{mapping}$ if for each closed set $C$ in $X$, $f(C)$ is closed in $Y$. 
My idea was along the lines of the following. 
Let $O$ be an open set in the interval $[0, 2\pi)$. Then $O = (a,b)$, $a>0, b<2\pi$.  Suppose $U = (0, 2\pi) = \cup O$. Where $U$ is the collection of all open sets $O$. Then $f(U)$ is the unit circle excluding the point $(1,0)$ Therefore an open set. 
Let $C$ be a closed set in the interval $[0, 2\pi)$. Let $\epsilon > 0$ be given. Then $C = [a, b]$ such that $a \geq 0$, $b \leq 2\pi- \epsilon$. Suppose $H = [0, 2\pi- \epsilon]= \cup C$. $H$ is the collection of all closed sets $C$. Then $f(H)$ is the approximately the unit circle radius 1 starting at the point $(1,0)$ ending and including a point before the point $(\cos(2\pi- \epsilon), \sin(2\pi- \epsilon))$. Therefore a closed set. 
Thus we have found a discontinuous, closed and open map. 
 A: Let $X$ and $Y$ be topological spaces on the same underlying set (with at least two elements), where $Y$ carries the discrete topology and $x$ the indiscrete topology. Then the identity map $X\to Y$ is open, closed, not continuous.
A: If you are content with any example of a map that is both open and closed but not continuous, the following will do:
Let $X$ be a set containing at least 2 elements; let $X_{d}$ denote $X$ equipped with the discrete topology (i.e. all subsets of $X$ are open) and let $X_{i}$ denote $X$ equipped with the indiscrete topology (i.e. the only open subsets of $X$ are $X$ itself and the empty set). Then the "identity" map $X_{i} \to X_{d}$ is (trivially!) both open and closed; but it is not continuous as the preimage of any non-empty proper subset $Y \subset X$ is not open in $X_{i}$.
A: You can find your answer even in very simple functions defined on $R$!
for example consider $f:R\to A$ where $A = (-\infty , 1]\cup(2,\infty)$ and
$$ f(x) =
 \begin{cases}
x   & x \in (-\infty , 1]\\
x+1 & x \in (1,\infty)
\end{cases}
$$
$f$ is clearly discontinuous but it's open and closed. to verify just derive $f^{-1}(x)$!
