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
Aleks [24]
3 years ago
11

Write a Python function prime_generator that takes as argument positive integers s and e (where s

Computers and Technology
1 answer:
nika2105 [10]3 years ago
6 0

Answer:

def prime_generator(s, e):

   for number in range(s, e+1):      

       if number > 1:

          for i in range(2, number):

              if (number % i) == 0:

                  break

          else:

               print(number)

   

prime_generator(6,17)

Explanation:

I believe you want to ask the prime numbers between s and e.

- Initialize a for loop that iterates from s to e

- Check if the number is greater than 1. If it is, go inside another for loop that iterates from 2 to that number. If the module of that number to any number in range (from 2 to that number) is equal to 0, this means the number is not a prime number. If the module is not equal to zero, then it is a prime number. Print the number

You might be interested in
Molly claims that she doesn’t have to proofread her code for typos because the interpreter will catch her mistakes for her. Is s
yarga [219]

Answer:

d. Yes, the interpreter will catch any syntax errors.

Explanation:

I just took the quiz and got the answer right, so I figured I'd share it here to help everyone out :3

Have a great day everyone, and keep those grades up!

4 0
2 years ago
How to upgrade from office home to office professional
ch4aika [34]
Work really hard start putting in more hours ask your boss for a raise
8 0
3 years ago
What is a benefit of peer-to-peer networking?
rjkz [21]
Users are independent. Such services as tor and freenet do not require a sign up process or fee to use.
6 0
3 years ago
Read 2 more answers
What tasks does google do?
melomori [17]
What do you mean by tasks?
4 0
3 years ago
Many malware attacks are ____ attacks, which involve more than one type of malware and/or more than one type of transmission met
Sedbober [7]

C. Malicious software (aka malware).

Hope this helps.

7 0
3 years ago
Other questions:
  • DSL technology is less efficient for service providers in the United States because many of their customers live in less-densely
    11·1 answer
  • Which data type stores images and audio visual clips?
    9·2 answers
  • The sun produces energy by the process of nuclear: <br><br> A.fission <br> B.fusion
    7·2 answers
  • What are the benefits of e learning​
    9·1 answer
  • What type of device does a computer turn to first when attempting to make contact with a host with a known IP address on another
    9·2 answers
  • Which famous individuals was born on october 31st?
    7·1 answer
  • Colin Mackay Inc., a software company with its head office in Amsterdam, has employees across three continents. Certain project
    11·1 answer
  • Match the desired outcome to the appropriate action.
    6·1 answer
  • What is an outcome in a game? Don't search google just give me an answer
    9·1 answer
  • 1. Write a statement that opens the file Customers.dat as a random access file for both reading and writing.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!