The set of [0,1] which decimal expansion consists of 4 and 7 I'm sorry if my question is repeated.
Let $E$ be the set of all $x\in [0,1]$ whose decimal expansion contains only the digits $4$ and $7$. Is $E$ contable? Is $E$ dense in $[0,1]$? Is $E$ compact? Is $E$ perfect?
Proof: It is easy to see that $E$ is uncountable. 
Also $E$ is not dense in $[0,1]$. Because if we take point $2/3\in [0,1]$ then it's neighborhood with radius $1/3$ has an empty intersection with $E$ because minimal element in $E$ is $0,\overline{4}=0,444\cdots=4/9$.
The set $E$ is bounded in $[0,1]$ (also in $\mathbb{R}^1$). Moreover, $E$ is closed in $[0,1]$.
Lemm: The set $E$ is closed in $[0,1]$.
We'll prove that $E^c$ is open in $[0,1]$. If $z\in E^c$ it means that decimal expansion of $z$ has minimal $j_0$ s.t. $a_{j_0}\notin \{4,7\}$. If $a_{j_0}\in \{1,2\}$ then we can take $\varepsilon=1/{10^{j_0}}$ and $N_{\varepsilon}(z)\subset E^c$ where $N_{\varepsilon}(z)=\{y\in [0,1]: d(y,z)<\varepsilon\}$. If $a_{j_0}\notin \{1,2,4,7\}$ then we can take $\varepsilon=1/{10^{j_0+1}}$ and $N_{\varepsilon(z)}\subset E^c$. It's easy to check these cases. Hence $E^c$ is open set.  $\Box$
But $E$ is NOT closed in $\mathbb{R}^1$. We can take $z=0,\overline{9}\in E^c$ and for any $\varepsilon>0$ we have $N_{\varepsilon}(z)\nsubseteq E^c$.
By Heine-Borel theorem we got that $E$ is NOT compact in $\mathbb{R}^1$. But I have one question. Will it be compact in $[0,1]$? After all $[0,1]\subset \mathbb{R}^1$. Can anyone answer this question in detail?
 A: Compactness is an absolute notion -meaning that it is defined for a topological space regardless of the ambient space whence it may be a subset - contrary to the notion of being closed, for instance. 
Now, if a space $X$ is compact, and if $F$ is a closed subset of $F$, then $F$ seen as a topological space (with the topology induced by that of $X$) is compact. 
Here you have proven that $E$ is a closed subset of $[0;1]$ which is compact, therefore, $E$ with the topology induced from $[0;1]$ is compact. 
It could have been that $E$ wouldn't be a closed subset of $\mathbb{R}$, then $E$ with the topology induced from that of $\mathbb{R}$ would not compact, but this topological space just wouldn't be the same as the former.
However, there is a mistake in your proof that $E$ isn't closed in $\mathbb{R}$, because $\frac{7}{9}$ is an upper bound of $E$ so $B(z,\frac{1}{9}) \subset E^c$. $(z = 0.\overline{9} = 1)$.
$E$ is actually closed in $\mathbb{R}$: it is closed in $[0;1]$, so there is a closed subset $F \subset \mathbb{R}$ such that $E = [0;1] \cap F$. Both $F$ and $[0;1]$ are closed in $\mathbb{R}$, so $E$ is too.
A: $E$ is closed in $[0,1]$ and in $\Bbb R$. The number $z=0,\bar 9$ (which is $1$), is in $E^c$ (to check whether $E$ is closed in $\Bbb R$, you must take the complementary respect to $\Bbb R$) and the interval $(0.9,1.1)$ is contained in $E^c$.
