On the space of the codes $X = \{1,2,3, ..., N-1\}^n$ is defined the distance between two points $x,y \in X$ with $$d(x,y) := \sum_{i=1}^n \frac{|x_i - y_i|}{(N+1)^i}.$$
Prove that each pair $(x,y)\in X^2$ is at a finite distance and that $(X, d)$ is a metric space. Prove that $(X, d)$ is a complete metric space.
I can't figure out how to prove this, please help.
$(X,d)$ is a metric space:
$(X,d)$ is complete: As Mindlack commented, this follows since $X$ is finite.