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
When the writer of a letter sends a copy to a third party without the knowledge of the person receiving the original letter, it
ahrayia [7]

The answer here is Blind carbon copy (bcc).

The original recipients of the letter are unable to see (blind) who else receives a copy if those parties are on the bcc list.

3 0
3 years ago
Match each feature of the E publishing as an advantage a disadvantage a threat or an opportunity
natta225 [31]

Answer:

E-publishing is also known as digital publishing or online publishing.It means to publish the content in electronic form.It is growing rapidly.It consist digital publication of e-books,digital magazines that can be read on a screen.

<u>Explanation:</u>E-publishing is very convenient.We do not have to keep  large number of books on the shelves.E-books are best during travelling because we need not to carry heavy luggage of books.E-books are cheaper than paperbacks.

E-publishing can allow the authors  to reach large number of readers.Electronic contents are very well updated.Electronic books are environment friendly.It saves wastage of papers and hence cutting of trees.

Besides above advantages there are some disadvantages of E-publishing:

There are more responsibilities in E-publishing.Chances of copyright infringement can be there.

Profits are very low in case of e-publishing.It is not easy to earn money through this method.

Quality of printed books is much better than e-books.

So we can say that e-publishing has it's own advantages and disadvantages.

3 0
3 years ago
Programmers refer to programs that contain meaningful names as ____. AnswerThe answer is: Programmers refer to programs that con
andreyandreev [35.5K]
Self documenting, we also make comments.
3 0
3 years ago
Suppose we want to compress a text consisting of 6 characters,a, b, c, d, e, fusingthe Huffman Algorithm. Give an example for wh
denis-greek [22]

Answer:

Check the explanation

Explanation:

When it comes to the field of computer science and information theory, the Huffman code is a specific type of optimal prefix code that is mostly utilized for the compression of lossless data. The process and procedures of finding or using such a code proceeds by means of Huffman coding, which is an algorithm that was developed by David A.

kindly check the below image for the complete answer to your question.

8 0
3 years ago
Horizontal scaling of a client/server architecture means _____.
Irina-Kira [14]

Answer:

D. I think

Explanation:

7 0
3 years ago
Other questions:
  • Personal Web Page Generator Write a program that asks the user for his or her name, then asks the user to enter a sentence that
    11·1 answer
  • When configuring a vpn server to automatically assign ​ip addresses to remote clients, how many ip addresses are in a single poo
    10·1 answer
  • Which of the following is an input device? (Select all that apply)
    13·1 answer
  • Give four characteristics of hard disk​
    8·1 answer
  • business information management professionals also perform duties of _ information system professionals
    11·1 answer
  • Which of the following ""invisible"" marks represents an inserted tab?
    10·1 answer
  • Please help I will mark brainliest ⚡️⚡️⚡️⚡️
    12·1 answer
  • Which of these is not a way of avoiding email fraud and scams?
    6·1 answer
  • Your manager asks you to get details on a computer crash. What Windows Administration Tool could you use?
    11·2 answers
  • Select the correct category of cybersecurity described.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!