Parameters of a linear code Consider the code $C=\{c=(c_1...c_n): c \in \Bbb F_q^n, c_1=c_n\} \subset \Bbb F_q^n$.

I was able to prove that the code is a linear code because it is closed under addition and scalar multiplication. 
Also, it is clear that the length is n. 

However I am having a hard time with minimum distance, dimension, and size.

For minimum distance: I know that for a linear code the minimum distance is equal to the minimum weight, or number of places with nonzero entries, of all nonzero codewords in C. However, I think the minimum weight can range between 1 to n entries, so does this mean that the minimum distance is 1?

For dimension and size: I know that the dimension is the order of the basis for C. I think that the basis is $B=\{10...01, 010...0, 001...0, ... , 0...010\}$, and so the dimension would be $n-1$, but I am unsure on this. 
If the dimension is $n-1$, then the size would be $q^{n-1}$.

Any help is appreciated, thank you in advanced. Please also let me know if this post does not belong to this stack exchange.
You're right, minimum distance is the minimal nonzero weight, thus 1.

A basis is what you gave. There are many bases. And youre right on size and dimension as well.

Edit: As pointed out in the other answer the distance is 2 if $n=2.$