# How do you write a piecewise function that has domain of (all real numbers) and range of y that is not equal to 2?

##### 1 Answer
Dec 5, 2017

A simple example is:
$y = 1$ (if $x = 2$)
$y = x$ (otherwise)

#### Explanation:

There are infinitely many functions that satisfy the condition.
However, none of these are continuous everywhere because of the intermediate value theorem.