1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
valkas [14]
4 years ago
9

Produce a list named primes which only contains the central number of two twin primes in the range [2,1000]. (A twin prime is a

prime number which has another prime number two away from it, like 41 and 43; in this case, we would add the number 42 to our list.) We provide a function is_prime to assist you with this. Call it like this: is_prime( 5 ).
Computers and Technology
1 answer:
uysha [10]4 years ago
4 0

Answer:

def is_prime(x):

for i in range(2,x):

if x%i==0:

return False

return True

primes=[]

for i in range(2,1001):

# print(i,is_prime(i),is_prime(i+2))

if is_prime(i) and is_prime(i+2):

primes.append(i+1)

print(primes)

Explanation:

You might be interested in
Rose has a list of two columns of information separated by tabs. She wants to input this information into a table. What is the f
andreev551 [17]
I gotchu my bro!!
it would be D. " clicking Convert Text to Table"
7 0
3 years ago
Read 2 more answers
I want to know all the part of computer system
Effectus [21]
There are alot of parts in a computer system. You have to be a little specific
4 0
3 years ago
What is it called when a user makes a typing error when entering a url that takes him to an imposter website?
Shtirlitz [24]
It’s called a typo squatting
6 0
4 years ago
When you select an object in the Visual Studio Designer, the object's size, color, text, and other characteristics are displayed
harina [27]

Answer:

the main window if that`s not correct sorry

Explanation:

3 0
3 years ago
How do you put a picture when you ask a question?
Setler [38]

Answer:

there should be an option to attach an item. if not try pasting it

Explanation:

5 0
4 years ago
Read 2 more answers
Other questions:
  • What are the best apps to learn coding
    15·2 answers
  • Before entering a loop, the first input, or ____, is retrieved.
    14·1 answer
  • Match these items. 1 . Naturalization Act stated that a foreigner had to live in the United States fourteen years to become a ci
    5·1 answer
  • How come the scroll bar on the PA emojis only appears sometimes? how do I make it appear?
    12·1 answer
  • How do the portrait and landscape page orientations help in the process of printing a worksheet?
    11·1 answer
  • COMPUTER FUNDIMENTAL HELP 20 POINTS!!!
    5·1 answer
  • Gary lives in an area that receives a lot of rain throughout the year. which device would be useful to him to maintain his compu
    8·1 answer
  • The commands available from a menu change depending upon what you are doing.<br> True<br> False
    11·2 answers
  • 1 #include 2 3 int max2(int x, int y) { 4 int result = y; 5 if (x &gt; y) { 6 result = x; 7 } 8 return result; 9 } 10 11 int max
    12·1 answer
  • What is the first step of viewing a web page as described in the video?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!