human
Find third number such that sum of all three number becomes prime | Function that will check whether number is prime or not.
Function to print the 3 rd number.
If the summ is odd.
If summ is not prime.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to find third number such that sum of all three number becomes prime and the other steps required.
 def prime ( n ) :
	for i in range ( 2 , n + 1 ) :
		if i * i > n + 1 :
			break
		if ( n % i == 0 ) :
			return False
	return True
def thirdNumber ( a , b ) :
	summ = 0
	temp = 0
	summ = a + b
	temp = 1
	if ( summ & 1 ) :
		temp = 2
	while ( prime ( summ + temp ) == False ) :
		temp += 2
	print ( temp )
a = 3
b = 5
thirdNumber ( a , b )