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
The answer for this question?
Debora [2.8K]
It will flow from 2 to 1
6 0
3 years ago
Do the pros of interpersonal communication via social media outweigh the cons? Explain.
JulijaS [17]
Well in my opinion is that yes they do. The ability to be able to communicate with others so far way really helps society advance towards the future. And i cant stress of how the benefits of being able to share ideas with well anyone is so wonderful.

I hope this helps.
6 0
2 years ago
Read 2 more answers
What are at least three tips to taking photographs of insects? Why would following the tips help create better photographs?
Ber [7]

1) Use a good cam 2) Make sure you focus on it 3) Make sure you snap it at the right time....    I hope this helps!!!!!

7 0
2 years ago
Write a method that takes two circles, and returns the sum of the areas of the circles.
11111nata11111 [884]

Answer:

public static double areaSum(Circle c1, Circle c2){

 double c1Radius = c1.getRadius();

 double c2Radius = c2.getRadius();

 return Math.PI * (Math.pow(c1Radius, 2) + Math.pow(c2Radius, 2));

public static void main(String[] args){

 Circle c1 = new Circle(6.0);

 Circle c2 = new Circle(8.0);

  areaSum(c1,c2);

 }

Explanation:

7 0
2 years ago
A checklist can be useful by helping A. organize information B. separate information C. portray information clearly D. all of th
Tema [17]
It's D because a checklist is to help you organize a list of things like groceries, homework etc. It can sperate indormation..for example, homework need to be separated so we won't messed up on which is which. It can also portray information clearly because you're making a check list.
3 0
3 years ago
Other questions:
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • Which animation effects allow text or images to show movement on a slide? Check all that apply. Entrance, Emphasis, Exit, Motion
    5·2 answers
  • Why is brainly not working it say im logged out rn but im not i cant acces anything but this
    12·2 answers
  • Which statement correctly compares blank presentations and themed presentations?
    12·2 answers
  • What does the Finder do?
    7·1 answer
  • What is output? Select all that apply.
    15·1 answer
  • The Apple iPhone was a revolutionary product when it was introduced in 2007. To what extent do you agree or disagree with this s
    8·1 answer
  • What application service allows you to decouple your infrastructure using messaged based queues?
    10·1 answer
  • A good way to assess your CPU usage is to:_______.
    13·1 answer
  • 5. Nadia wants to calculate the total interest, which is the total amount of the payments minus the loan amount. In cell F6, ent
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!