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
guapka [62]
3 years ago
10

Consider the following sequence, defined from n=2 to 15 (inclusive). Pn=n2−1. Produce a list named primes which only contains va

lues from this sequence which are prime. We provide a function is_prime to assist you with this. Call it like this: is_prime( 5 ).
Computers and Technology
1 answer:
omeli [17]3 years ago
5 0

Answer:

primes = []

for n in range(2,16):

   pn = n*n - 1

   if is_prime(pn):

       primes.append(pn)

You might be interested in
So wait how do i comment on someone's answer because that would be useful ,,.
LuckyWell [14K]

Answer:

Type right under my comment

Explanation:

Look in comments

5 0
3 years ago
Read 2 more answers
Write a program that takes a point (x,y) from theuser and find where does the point lies. The pointcan
agasfer [191]

Answer:

C++ Program .

#include<bits/stdc++.h>

using namespace std;

int main()

{

int x,y;//declaring two variables x and y.

string s;//declaring string s..

cout<<"enter x and y"<<endl;

cin>>x>>y;//taking input of x and y..

if(x>=0 &&y>=0) //condition for 1st quadrant..

cout<<"the point lies in 1st Quadrant"<<endl;

else if(x<=0 &&y>=0)//condition for 2nd quadrant..

cout<<"the point lies in 2nd Quadrant"<<endl;

else if(x>=0 &&y<=0)//condition for 3rd quadrant..

cout<<"the point lies in 3rd Quadrant"<<endl;

else //else it is in  4th quadrant..

cout<<"the point lies in 4th Quadrant"<<endl;

cout<<"enter n to terminate the program"<<endl;

while(cin>>s)//if the user has not entered n the program will not terminate..

{

   if(s=="n")

   {

       cout<<"the program is terminated"<<endl;

       exit(0);

   }

   cout<<"you have not entered n please enter n to terminate the program<<endl;

}

}

Explanation:

The above written program is for telling the point lies in which quadrant.I am first declaring two variables x and y.Then after that taking input of x and y after that checking in which quadrant the point lies.

Taking input of the string s declared earlier for program termination the program will keep running until the user enters n.

4 0
3 years ago
HTML question please help
Pie

Answer:

background-color: (Color)

Explanation:

This is actually CSS coding, as you would code it like:

Body {

background-color: (Color)

}

5 0
3 years ago
Decrypt this secret message if your able to a lot will come..
nata0808 [166]

Answer:-

Failure

and 0008

Hope This Helps

7 0
2 years ago
Read 2 more answers
What changes has Sue made so far? Check all that apply.
Alexus [3.1K]

Answer:

Its C, E, and F

Explanation:

On edg

8 0
3 years ago
Read 2 more answers
Other questions:
  • (GAME DESIGN)
    15·1 answer
  • Which part of a window lets you see a fileâs contents without opening the file?
    9·1 answer
  • Can Microsoft Excel can use Headers and Footers, just like Microsoft Word
    9·1 answer
  • The color band that represents tolerance on a resistor is the?
    11·1 answer
  • Who is the founder of javascript? ​
    14·2 answers
  • William found out that someone used his report on American culture without his permission. What is William a victim of? A. plagi
    7·2 answers
  • All of the following are advantages of database-stored information, except ______________. Multiple Choice
    7·1 answer
  • What is machine learning
    9·2 answers
  • It is where your cpu (processor) is installed
    10·2 answers
  • ....is an act of introducing an invention into market on business basis for profit​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!