Continuous Functions, Rational number/ Irrational number.

Let be continuous on and suppose that for each rational number x in .Prove that

Ok, Do I need to do a proof by contradiction to prove that . What it comes down to is proving that for each irrational number , right???
Otherwise I don't really see how to do it, I mean even if I do by contradiction the way I thought about doing it was maybe say something like Assume that
I am not sure... any suggestion?

Let be continuous on and suppose that for each rational number x in .Prove that

Ok, Do I need to do a proof by contradiction to prove that . What it comes down to is proving that for each irrational number , right???
Otherwise I don't really see how to do it, I mean even if I do by contradiction the way I thought about doing it was maybe say something like Assume that
I am not sure... any suggestion?

If is an irrational number then there is a sequence of rational numbers so that . Then by continuity .

So from the problem we know the behavior of the function when x is rational so that is why we just have to look at the function when x is irrational, correct?
I don't understand that part, how come you if you have x as an irrational number you have to have a sequence of rational numbers so that ??? Can you explain a little?

Do you understand the theorem Between any two real numbers the is a rational number?
No matter how one approaches this problem, that theorem is used.
If z is irrational, then .
It should be clear to you that which means

Ok, I understand what you mean. I think I am starting to understand better but I am still a little confused about one little part of your explanation (sorry for asking so many question).

So you said

If z is irrational, then .

That part I follow and understand it no problem now.

The only thing that I am not sure I understand is

It should be clear to you that which means

because the problem states that for each rational number x in , however in your thing you said that being an irrational number which is the opposity of what is stated in the problem isn't it??? Or am I missing something? Or is it because since is rational then
according to the problem?? So since , then more or less???

I am sorry to ask that many question, I am juste tying to be sure I understand it well and that I don't get this answer for the wrong reason.
Thanks for all your help.