Question: 1) wite a function that takes an even number as input and either prints out a way that the number can be written as the

1) wite a function that takes an even number as input and either prints out a way that the number can be written as the sum of two primes (there may be more tthan one, just print one) or prints a message that the conjecture is false.
2) Modify your function to another one that returns True iif the conjecture is true for n and False if n can't be written as the sum of two primes.
3) Use the function in part 2 to check if the conjecture is true for all even numbers from 6 to 100,000.
def isprime(x): if x % 2 == 0: return false d = 3 done = False result = True bound = round (x**(1/2)) # while not done: print(d) if x%d == 0: result = False done = True print(d, x//d) else: d = d + 2 if d> bound: done = True return result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
