Answer
$\$0$
Work Step by Step
Since there are $6$ digits on the lock, there are $10^{6} = 1,000,000$ different combinations which can be guessed. The probability of any guess matching the actual combination is therefore $\frac{1}{1,000,000}$.
$1,000,000\times\dfrac{1}{1,000,000} - 1= 0$
The dollar is taken away as it is paid to guess the combination on the lock.
Therefore the expected outcome is $\$0$.