if x is the addition of the prime numbers between 1 and 6; and y…