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]
4 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]4 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
How are Action Buttons different than hyperlinks?
ipn [44]

Actions buttons are different than hyperlinks in many ways.

2)They are predefined shapes.

<u>Explanation:</u>

Action buttons are predefined shapes in the PowerPoint and can be used for moving between the slides of the presentation and for referring to the hyperlinks as well.

Action buttons have a predefined shape and that shape can be used to set the functionality of that particular button as a convention. Action buttons make up a strong presentation.

Action buttons can be invoked by clicking on them or just hovering over them and various sound effects can also be added on both the events to make the presentation more engaging and attractive.

8 0
3 years ago
One of the best ways to shoot a picture is to frame the subject in the middle of the screen or viewer. T or F
Ronch [10]
Your answer is T for True
3 0
3 years ago
Read 2 more answers
Why would "ExpirationDate” be a poor choice as a primary key?
denis23 [38]
<span>There could be more than one item with the same expiration date, and primary keys must be unique.</span>
4 0
4 years ago
Let x = ["Red", 2.55,"Green", 3,"Black","false"], then solve the following:
blagie [28]

Answer:

  • Print(x) would be directly calling the x variable so it would print everything but the []
  • Print(x[10]) is calling the number 10 which results in E
  • 2 + d= 2d

3 0
3 years ago
Determine the exact output of the code:
stiv31 [10]

Answer:

3

Explanation:

The function floor() is used to give the integer which is smaller than or equal to the provided decimal value.

for example:

let a=5.8

floor(a);

the function provides the value 5 (smaller than or equal to 5.8).

In the given code:

variable num assigns the number 3.14.

then, floor(3.14) gives the value 3 (smaller than or equal to 3.14).

then, the echo print the value on the screen.

Therefore, the correct answer is 3.

4 0
4 years ago
Other questions:
  • Code Example 4-3 main program: import arithmetic as a def main(): num1 = 5 num2 = 6 result = a.add(num1, num2) print("The sum is
    15·1 answer
  • In a pinhole camera, the image seen in the camera will be inverted<br><br> true<br> false
    13·2 answers
  • What is the definition of the components that motherboards, ssds, processors, and cases are part of?
    10·1 answer
  • Jimmy is running out of desk space. He keeps three computers on his desk. The three computers can’t be moved, and they need to b
    5·2 answers
  • In the Dread Pirate Roberts case, U.S. Ulbricht, 31 F. Supp. 3D 54D (S.D.N.Y. 2014), one of the issues that the court addressed
    10·1 answer
  • What do developers do to support software products
    14·1 answer
  • Jerry recently purchased a new iPad. He needs guidance on setting it up and wants to find documentation to help with the setup.
    9·2 answers
  • Which is an example of correct HTML? &lt;h1&gt; This is a heading&lt;/h1&gt;
    9·2 answers
  • Which of the following is false? Group of answer choices A) A string may include letters, digits, and various special characters
    7·1 answer
  • This my question for programming class
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!