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
Simora [160]
3 years ago
7

Write a Python function isPrime(number) that determines if the integer argument number is prime or not. The function will return

a boolean True or False. Next, write a function HowManyPrimes(P), that takes an integer P as argument and returns the number of prime numbers whose value is less than P. And then write a function HighestPrime(K) that takes integer K as an argument and returns the highest prime that is less than or equal to K.
Computers and Technology
1 answer:
pickupchik [31]3 years ago
3 0

Answer:

def test_prime(n):

   if (n==1):

       return False

   elif (n==2):

       return True;

   else:

       for x in range(2,n):

           if(n % x==0):

               return False

       return True              

print(test_prime(9))

You might be interested in
hello fellows i need a help.Ineed to know about computer evolutions and computer generations.please hurry.Its my rankover questi
mestny [16]

Answer: Computer generations: There was First Generation 50s,60s. 2nd  60s,70s, 3rd, 70s, Present, and 4th Future.

Computer evolutions: The first modern computer was created in the 1930s and was called the Z1, which was followed by large machinery that took up entire rooms. In the '60s, computers evolved from professional use to personal use, as the first personal computer was introduced to the public.

Explanation: This took me about 10 minutes. Enjoy.

8 0
2 years ago
You wrote a program to allow to guess a number chosen randomly.
Furkat [3]

Answer:

I think its A

Explanation:

5 0
3 years ago
Read 2 more answers
In general, the outside _____ and sleeves of the isolation gown and outside front of the goggles, mask, respirator and face shie
diamong [38]
The answer to this question is the letter "A" which is TIES. In general, the outside TIES and sleeves of the isolation gown and outside the front of the goggles, mask, respirator and face shield are considered "contaminated" regardless of whether there is visible soil.
7 0
3 years ago
Read 2 more answers
Data elements in a relational database are organized into ____
Rainbow [258]

Data elements in a relational database are organized into _Tables_

Hope it helps!

8 0
2 years ago
Under which menu option of a word processing program does a star appear?
Citrus2011 [14]

A callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES <span>menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question. </span>
3 0
3 years ago
Read 2 more answers
Other questions:
  • The main events of the civil war and reconstruction
    14·1 answer
  • Where is line-of-sight Internet common?<br> In space<br> Outdoors<br> Inside<br> In businesses
    10·1 answer
  • What refers to the protocolâ s ability to ensure that data hasnâ t been modified in any way?
    15·1 answer
  • People are able to predict future events to some extent because: (Select all that apply)
    11·1 answer
  • Dereck works for long hours on his computer. He frequently experiences physical strain by the end of the day because he does not
    8·2 answers
  • In python please.
    6·1 answer
  • a limited-access expressway. A)allows vehicles to enter or exit only at certain place.B) does not permit trucks or buses.C)has n
    9·1 answer
  • NEXT
    15·2 answers
  • To print photographs in color.​
    7·1 answer
  • Why should teachers refrain from using extreme language, such as “I’m dying of hunger,” around four- and five-year-old children?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!