Probability that at least or exactly A code of 4 characters is generated. The characters are taken from the set $\left\{0,1,2...9,A,B...F\right\}$. What is the probability that:
1.The code is made-up only by distinct letters.
For this point I just that the probability is the product $\frac{6}{16}\cdot \frac{5}{16}\cdot \frac{4}{16}\cdot \frac{3}{16}$ as those are the probabilities that you have a letter in your code, and once you get one, you cannot choose it again. Is this an appropiate solution?
The tricky part comes at the second part of this problem. It asks me to calculate the probability that the code contains the number 2 at least once. I don't know how to approach this. Another point asks me to calculate the probability that the letter E appears exactly twice in the code. Would this probability be the product $\frac{1}{16}\cdot \frac{1}{16}\cdot \frac{15}{16}\cdot \frac{15}{16}$ ?
This isn't homework, I just have an upcoming probability exam and I want to see how these type of exercises are being solved. Could someone help me a bit with this?
 A: There are $16$ characters including the $10$ digits and $6$ letters
First Part of your question

Number of ways $4$ characters can be selected $=\dbinom{16}{4}=1820$
Number of ways $4$ characters can be selected where each character is an
  alphabet $=\dbinom{6}{4}=15$
Required probability $=\dfrac{15}{1820}=\dfrac{3}{364}$

Alternate Solution

P(first letter is alphabet):$\dfrac{6}{16}$
P(second letter is alphabet):$\dfrac{5}{15}$
P(third letter is alphabet):$\dfrac{4}{14}$
P(fourth letter is alphabet):$\dfrac{3}{14}$
Required probability: $\dfrac{6}{16}\times \dfrac{5}{15} \times
 \dfrac{4}{14} \times \dfrac{3}{13}=\dfrac{3}{364}$

Second Part of your question

Number of ways $4$ characters can be selected $=\dbinom{16}{4}=1820$
Number of ways $4$ characters can be selected which must not contain any
  $2$ $=\dbinom{15}{4}=1365$
So, Number of ways $4$ characters can be selected which must contain at
  least one $2$ $=1820-1365=455$
Required probability $=\dfrac{455}{1820}=\dfrac{1}{4}$

Alternate Solution

P(any first letter except $2$):$\dfrac{15}{16}$
P(any second letter except $2$):$\dfrac{14}{16}$
P(any third letter except $2$):$\dfrac{12}{16}$
P(any fourth letter except $2$):$\dfrac{12}{16}$
Therefore, required probability
$=1-\dfrac{15}{16}\times \dfrac{14}{15} \times \dfrac{13}{14} \times
 \dfrac{12}{13}=\dfrac{1}{4}$

A: Your Part 1 have some mistake. It should be -
$\frac{6}{16}\cdot \frac{5}{15}\cdot \frac{4}{14}\cdot \frac{3}{13}$
Part 2 -
We should have at least one time 2. It means we can have two times 2 or three times or four times.
Sum of all probabilities = 1
So atleast one time 2 = 1 - Case with no 2
$= 1 - \frac{\binom {15}{4}}{\binom {16}{4}}$
