The probability would be 1/7.
To factor trinomials in the form x²+bx+c, we look for factors of c that sum to be. In our case, we want factors of k that sum to 7. Since we know k must be an integer, we will list the ways to sum to 7 with positive integers:
1+6
2+5
3+4
This is where the 3 comes in the probability.
Since 0≤k≤20, there are 21 different integers that k could equal. Therefore our probability is 3/21 = 1/7.