Can anyone Crack this code by elaborating the clues

Ans;042
Can anyone Crack this code by elaborating the clues

Ans;042
On
From $4th$ we know that $7,3,8$ are not part of the answer.
In $5th$ we discover $0$ as solution and cannot be in $3rd$ position.
Comparing $1$ and $2$ we know that $6$ cannot be part of the answer as a contradiction, $8$ isn't part of solution as well. Therefore we discover digit $2$ in third position.
Note that on $3rd$, $6$ as solution was discarded so $0,2$ is solution but in wrong position since $0$ cannot be $3rd$ nor $2nd$ it must be $1st$. Now we have $0x2$.
Now checking $2nd$ we notice that for getting $x$ we need middle value, since $6$ isn't a solution we select $4$ since placing it in middle will make a well placed. Then $042$.
From (1) and (2) we can find 6 is not number. So from (1) either 8 is correct or 2. Then from (4) we can see 8 is not correct. So we left with 2. Fill it on 3rd place.
From (3) two numbers are correct. As 6 cannot be the number we left with 0, 2. And 2 is already in 3rd place. And 0 on second place is wrong. So we have 0 on first place.
From (2) we know 6 can't be the number. We left with 1 and 4. We can't place 1 on first or third place. So it is not the number. We left with 4 and second position.
So answer is 042.