1: Consider and then apply the intermediate value theorem to the interval [0,1].

2: Suppose that f is not constant then it takes on at least 2 different values. Apply the intermediate value theorem and the fact that between any 2 real numbers there is an irrational number.