Continuous function/Q to R/Finitely many values/Not constant/Exercise

Give an example of a continuous function

which takes exactly two values​​.