Problem about metric space Let $X$ be the set of sequences of zeros and ones. For $x=(x_1, x_2, x_3, \dotsc)$ and $y=(y_1, y_2, y_3, \dotsc)$ in $X$, define
 $$d(x,y) = \sum_{j=1}^\infty \frac{ |x_j - y_j| } {2^j}.$$
(a) Prove that $d(x,y)$ is a metric for $X$. 
(b) Let $E$ be the subset of $X$ consisting of all sequences that are eventually $0$. Thus, $x=(x_1, x_2, \dotsc) \in E$ when
there exists $N \geq 0$ such that $x_n=0$ for all $n \geq N$.
Prove that $E$ is dense in the metric space $(X,d)$.
Actually it is even hard to understand the problem. Even if (a) is solved, I don't know how to solve (b).

I've solved (a). But proving (b) is very hard for me. The following are from my sketch.
any sequence x in E $\to 0$, and $d(x,y) \leq 1$ for all x,y in X.
dense definition
$S\subset X^{metric}$ is dense if $\bar S = X$ (or $X \subset \bar S)$
i.e.
$ \forall x\in X, \forall \epsilon>0, B(x;\epsilon)\cap S \neq \emptyset$

Let me consider any $y\in X$ with $y\notin E$ and consider any $x \in E$.
I want to show $\forall \epsilon>0, d(x,y) < \epsilon$.
$d(x,y) \leq 1$ is true.
Assume $n \geq N$. (if $n < N$, there may exist x such that x=y)
(i) If $y_n = 0, d(x,y)=0 < \epsilon$
(ii) If $y_n = 1, d(x,y)<1 
At this time, I have lost.
If x={1,1,0,0,0,0,...} and y={1,1,1,1,1,1,...}, then how to show $d(x,y) < \epsilon?$
I think I should have errors and missing parts.
 A: Hint for (a): Use that for arbitrary real numbers $x$, $y$, $z$ one has $|x-z|\leq |x-y|+|y-z|$.
It follows that for arbitrary $x=(x_j)_{j\geq1}$, $y=(y_j)_{j\geq1}$, $z=(z_j)_{j\geq1}$ one has
$$d(x,z)=\sum_{j=1}^\infty {|x_j-z_j|\over 2^j}\leq\ldots\quad.$$
Hint for (b): Given an arbitrary $y\in X$ and an $\epsilon>0$ put $x_k:=y_k$ for $1\leq k\leq n$ and $x_k=0$ for $k>n$, where $n$ is chosen judiciously, i.e., sufficiently large, depending on $\epsilon$.
To be more specific: Given an $\epsilon>0$ there is an $n$ with ${1\over 2^n}<\epsilon$. Choosing $x\in E$ as indicated we have
$$d(x,y)=\sum_{k=n+1}^\infty {y_k\over 2^k}\leq \sum_{k=n+1}^\infty {1\over 2^k}\leq{1\over 2^n}<\epsilon\ .$$
This proves that in any $\epsilon$-neighborhood of a given $y\in X$ there is an $x\in E$.
A: For (a) $d(x,y)=\sum_{n=1}^\infty\frac{|x_n-y_n|}{2^n}\leq\sum_{n=1}^\infty\frac{|x_n-z_n|}{2^n}+\sum_{n=1}^\infty\frac{|z_n-y_n|}{2^n}=d(x,z)+d(x,y)$ 
This was acheived just by using the triangle inequality in $\mathbb{R}$, now for part (b) you need to prove that any sequence of zero's and one's is a limit point of sequences that are eventually zero.
So use the fact that if $x\in E$ then it has finitely many terms that are one (and also zero) up to some $N$.
And you can use the fact that up to the first $N$ terms.
A sequence in $X$ can be approximated exactly by a sequence in $E$.
So to prove denseness we need to show that for a sequence $y=y_n\in X $, $\forall\epsilon\gt 0$ we can take a ball of radius $\epsilon $ centred at y, With A Sequence $x=x_n \in E $ that lies in the ball.
Firstly if $x\in B (y,\epsilon)\Rightarrow d(x, y)\lt\epsilon$ (this is what we need to show by constructing the correct $x $).
Let $x_i=y_i $ for the first $N $ terms, and 0 there after.
Now $d(x, y )=\sum_{n=1}^\infty\frac{|x_n-y_n|}{2^n}=\sum_{n=N+1}^\infty\frac{|x_n-y_n|}{2^n}\leq\sum_{n=N+1}^\infty\frac{1}{2^n}\lt \epsilon$, if $N $ is sufficiently large.
Thus $x $ lies in the ball meaning any point in $X $ is a limit point of $E $ so $E $ is dense in $X $.
