```
def check_goldbach_for_num(n,primes_set) :
    '''gets an even integer- n, and a set of primes- primes_set. Returns whether there're two primes which their sum is n'''
    
    relevant_primes_set={p for p in primes_set if p<n}

    for prime in primes_set :
        if (n-prime) in  relevant_primes_set:
            return True
    return False


```


```
from sympy.ntheory.generate import primerange
primes = set(primerange(50,1000))
check_goldbach_for_num(116, primes)
```

b6d249e42f624b5322b7f99ba0cb0a3900d40eab
ipynb
Jupyter Notebook
demo/goldbach/submissions/2.ipynb
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
MIT
2021-02-17T20:45:17.000Z
2022-03-16T19:39:00.000Z
demo/goldbach/submissions/2.ipynb
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
MIT
2021-03-05T01:11:45.000Z
2022-03-23T04:08:58.000Z
demo/goldbach/submissions/2.ipynb
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
MIT
2021-02-14T04:27:34.000Z
2022-03-03T07:29:49.000Z
Qwen/Qwen-72B
1. YES
2. YES