Given a positive integer n, assign true to is_prime if n has no factors other than 1 and itself. (remember, m is a factor of n if m divides n evenly.)

Answers

Answer 1
This is the following condition in order to get the specific output for this specific problem: if is_a_prime(n):    is_prime = True Now all you have to do is write is_a_prime().

For the hard code for this problem:

if n == 2:
is_prime = True
elif n % 2 == 0:
is_prime = False
else:
is_prime = True 
for m in range (3, int (n * 0.5) + 1, 2): 
if n % m == 0: 
is_prime = False 
break. 

To add, a high-level programming language that is widely used for general-purpose programming, created by Guido van Rossum and first released in 1991 is called Python.
Answer 2

Below is the solution of assign true to is_prime if n has no factors other than 1 and itself.

Further explanation

Python is an interpreted, high-level, general-purpose programming language. Python is created by Guido van Rossum and first released in 1991. Its design philosophy emphasizes code readability. Python is a more productive language than Java because it is an interpretive language which is accompanied by elegant syntax and it makes an excellent choice for scripting and rapid application development in many areas. Python is a general-purpose, versatile and popular because it is concise and easy to read, and it is also a good language to have in any programmer’s stack as it can be used for everything such as web development, software development, data science applications.

Given a positive integer n, assign true to is_prime if n has no factors other than 1 and itself. And remember, m is a factor of n if m divides n evenly. So:

if n == 2:

is_prime = True

elif n % 2 == 0:

is_prime = False

else:

is_prime = True

for m in range (3, int(n**0.5)+1, 2):

if n % m == 0:

is_prime = False

Learn moreLearn more about python https://brainly.com/question/4331067Learn more about python IDLE or similar environment  https://brainly.com/question/6280029Learn more about python function https://brainly.com/question/9806744

Answer details

Grade:  9

Subject:  mathematics

Chapter:  python

Keywords:  python, integer, factors, python IDLE, is_prime


Related Questions

A teacher has 3 hours to grade all the papers submitted by the 35 students in her class. She gets through the first 5 papers in 30 minutes. How much faster does she have to work to grade the remaining papers in the allotted time/4347395/f56da09a?utm_source=registration

Answers

The current grading rate is
(30 minute)/(5 papers) = 6 minutes/paper.

She has 3 hours (or 180 minutes) to grade 35 papers.
She now has 180 - 30 = 150 minutes left, and she has  35- 5 = 30 papers left.

The remaining grading rate is
(150 minutes)/(30 papers) = 5 minutes/paper

Therefore she must work at 1 minute/paper faster to complete grading 35 papers in 3 hours.

Answer: She should work faster at an increased rate of  1 minute per paper.

You place a cup of 200 degrees F coffee on a table in a room that is 67 degrees F, and 10 minutes later, it is 195 degrees F. Approximately how long will it be before the coffee is 180 degrees F? Use Newton's law of cooling: T(t)=T[a]+(T[o]-T[a])e^-kt A. 40 minutes B. 15 minutes C. 1 hour D. 35 minutes

Answers

195=67+(200-67)e^(-10k)

195=67+133e^(-10k)

128=133e^(-10k)

128/133=e^(-10k)

ln(128/133)=-10k

k=-ln(128/133)/10

T(t)=67+133e^(tln(128/133)/10), if T(t)=180

180=67+133e^(tln(128/133)/10)

113=133e^(tln(128/133)/10)

113/133=e^(tln(128/133)/10)

ln(113/133)=tln(128/133)/10

10ln(113/133)=tln(128/133)

t=10ln(113/133)/ln(128/133)

t≈42.5 minutes...

t≈40 minutes (to nearest 5 minutes? :P)


43 mins to keep it
short but other than that same as the the other guy

car rental in Thailand cost $35 per day when booked in advance. If rented locally you would be charged 1800 bahts per day. If the exchange rate is 40 bahts equals $1 how much cheaper is it to book in advance

Answers

40 bahts = $ 1.....so 1800 bahts = 1800/40 = $ 45

book in advance = $ 35

so it is (45 - 35) = $ 10 bucks cheaper to book in advance

Answer:

advance booking is cheaper by 400 bahts or $10.

Step-by-step explanation:

Car rental cost in advanced booking = $35 per day

and

when the rented locally it is charged = 1800 bahts per day

it is given that,

$1 is equal to 40 bahts.

now,

Car rental cost in advanced booking =  35  × 40

                                                              = 1400 bahts

hence, when booking is done advance

  the cost is cheaper  by  1800 - 1400 = 400 bahts

hence, advance booking is cheaper by 400 bahts or $10.

if 3×1=34 2×3=65 6×1=67 5×4=209 then 6×3=

Answers

189.

3*1=34 --> split this into two parts. 3*1 is 3 and 3+1 is 4 so put them together and you get 34.

Answer:

189 is the answer

Step-by-step explanation:

-1/9 - (-2/15)
write in simplest form

Answers

-1/9 - (-2/15)
= -1/9  +2/15
= -5/45 + 6/45
= 1/45


Identify each statement as true or false, show how you would rewrite it to make it a statement.

Answers

1. false= 3•2+3•4
2. true
3. false= 7•20+7•8
4. false= 4•5+4•10
5. true

Reducing the original price of an item is often called

Answers

Should be markdown, but if you have other options let me know and I'll tell you which it is.  But if markdown is one of your choices, or if this is fill-in, it's markdown.

Answer:

Price reduction.

Step-by-step explanation:

The act of reducing the selling price of products in order to attract costumers is called Price Reduction. This comprehends a marketing strategy.

You have $36,948.61 in a brokerage account, and you plan to deposit an additional $3,000 at the end of every future year until your account totals $280,000. you expect to earn 11% annually on the account. how many years will it take to reach your goal? round your answer to two decimal places at the end of the calculations.

Answers

Current amount in account
P=36948.61

Future value of this amount after n years at i=11% annual interest
F1=P(1+i)^n
=36948.61(1.11)^n

Future value of $3000 annual deposits after n years at i=11%
F2=A((1+i)^n-1)/i
=3000(1.11^n-1)/0.11

We'd like to have F1+F2=280000, so forming following equation:
F1+F2=280000
=>
36948.61(1.11)^n+3000(1.11^n-1)/0.11=280000

We can solve this by trial and error.


The rule of 72 tells us that money at 11% deposited will double in 72/11=6.5 years, approximately.
The initial amount of 36948.61 will become 4 times as much in 13 years, equal to approximately 147800 by then.
Meanwhile the 3000 a year for 13 years has a total of 39000.  It will only grow about half as fast, namely doubling in about 13 years, or worth 78000.
Future value at 13 years = 147800+78000=225800.
That will take approximately 2 more years, or 225800*1.11^2=278000.

So our first guess is 15 years, and calculate the target amount
=36948.61(1.11)^15+3000(1.11^15-1)/0.11
=280000.01, right on.

So it takes 15.00 years to reach the goal of 280000 years.

this figure is a regular 12 sided polygon and measure of a angle is 4

Answers

Well, a 12 sided polygon is called a dodecagon. I hope this helps!

jane drinks 3 1/2 pints of milk a day. how much is this in cups?

Answers

Hey there!

So what we need to know first is how many cups are in a pint...

1 pint = 2 cups 

So now we can set this up as a ratio or a fraction... then give the value of cups a variable (x)

1:2 = 3.5:x
x = 7 cups      <----- That's your answer!  

I hope this helps! :D

Please vote me for Brainliest if there is a second answer! ^__^

Identify the domain of the exponential function shown in the following graph: (2 points) Exponential graph starting at point 0, 30000 and approaching the x axis as it moves left to right. Select one: a. all real numbers b. x ≥ 0 c. 0 ≤ x ≤ 30,000 d. 7 ≤ x ≤ 30,000

Answers

b. x>=0
You don't say it terminates but goes to infinity, therefore all values of x>=0 is the domain

Answer: b. [tex]x\geq 0[/tex] , where x is the positive real numbers.

Step-by-step explanation:

We Know that, The Set of all Possible values of independent variable is called Domain of the function.

Since, Exponential graph starting at point (0, 30000),

Thus, the initial value of value of independent variable is 0.

Also,  The given exponential function is approaching the x axis as it moves left to right.

Therefore, The Domain must contain the all positive real numbers.

Thus, the Domain of the given function is [tex]x\geq 0[/tex] , where x is the positive real numbers.

Therefore, Option b is correct.

Find the quotient of 3 1/8 and 1 2/7 .

Answers

The answer is 2 because you have to 3 1/8 and 1 2/7

16 less than one-fourth of some​ number, w" can be expressed algebraically as

Answers

"16 less"= -16

"one-fourth some number w"= w/4

So together

w/4-16

How to factor 4(x+5)^3(x-1)^2-(x+5)^4 • 2 (x-1) by grouping?

Answers

[tex]\bf 4(x+5)^3(x-1)^2-(x+5)^4\cdot 2(x-1) \\\\\\ 4(x+5)^3(x-1)^2-2(x-1)(x+5)^4 \\\\\\ \underline{2}\cdot 2\underline{(x+5)^3}(x-1)\underline{(x-1)}~-~\underline{2}\underline{(x-1)}(x+5)\underline{(x+5)^3}\leftarrow \begin{array}{llll} notice~the\\ common\\ \underline{factors} \end{array} \\\\\\ 2(x+5)^3(x-1)~[~2(x-1)-(x+5)~] \\\\\\ 2(x+5)^3(x-1)~[2x-2-x-5]\implies 2(x+5)^3(x-1)(x-7)[/tex]

How much water should be added to 14 mL of 15% alcohol solution to reduce the concentration to 7%?

Answers

Final answer:

To decrease the concentration of a 15% alcohol solution to 7%, 16 mL of water needs to be added to the original 14 mL solution.

Explanation:

The problem involves using the concept of concentration dilution that is C1V1 = C2V2, where C1 is the initial concentration, V1 is the initial volume, C2 is the final concentration, and V2 is the final volume.

First, we need to convert the percentage to decimal so, C1=0.15 (15% as a decimal) and C2=0.07 (7% as a decimal). We know V1=14 mL (the starting volume of the 15% alcohol solution) and we are solving for V2.

Insert the known values into the equation and solve for V2: (0.15)(14) = (0.07)(V2). After calculation, V2 is approximately 30 mL.

To figure out how much water should be added to reduce the concentration from 15% to 7%, subtract the initial volume from the final volume: 30 mL - 14 mL = 16 mL.

So 16 mL of water needs to be added to the 15% alcohol solution to reduce the concentration to 7%.

Learn more about concentration dilution here:

https://brainly.com/question/22597773

#SPJ3

Which of the following nonlinear inequalities is graphed below? Picture included below!! PLEASE HELP ASAP!

Answers

I think it is A, cause the horizontal axis is 4 (x), and the vertical axis is 8 (y)
and then the <= means that it is inside the ellipse

Answer:

The correct option is A.

Step-by-step explanation:

The general form of an ellipse is

[tex]\frac{x^2}{a^2}+\frac{y^2}{b^2}=1[/tex]

Where, (0,0) is the center of ellipse, (±a,0) are x-intercepts and (0,±b) are y-intercepts.

From the given graph it is clear that the center of ellipse is (0,0), (±2,0) are x-intercepts and (0,±4) are y-intercepts. So, the equation of ellipse is

[tex]\frac{x^2}{(2)^2}+\frac{y^2}{(4)^2}=1[/tex]

[tex]\frac{x^2}{4}+\frac{y^2}{16}=1[/tex]

The shaded region is inside the ellipse, (0,0) lie in the solution set and the points lie on the ellipse are included in the solution set, therefore the sign of inequality is ≤.

[tex]\frac{(0)^2}{4}+\frac{(0)^2}{16}\leq 1[/tex]

[tex]0\leq 1[/tex]

This statement is true. The required inequality is

[tex]\frac{x^2}{4}+\frac{y^2}{16}\leq 1[/tex]

Therefore, the correct option is A.

Add or subtract the following mixed numbers using the first method. Be sure your answers are in mixed number format and reduced to lowest terms. 3 3/8 + 2 1/6 =

Answers

we have the number here are 3 3/8 and 2 1/6
by using the first method,
multiplying 3/8 with 3/3 and 1/6 with 4/4 we get 9/24 and 4/24 so,
3 9/24 + 2 4/24 = (3+2) and (9/24 + 4/24)
when adding 3 and 2 we get 5 and adding 9/24 and 4/24 we get 13/24
so the answer is 5 and 13/24

A total of 634 tickets were sold for the school play. They were either adult tickets or student tickets. There were 66 fewer students tickets sold than adult tickets. Him many adult tickets were sold?

Answers

x= student tickets
y= adult tickets 

x+y=634
y=x-66

x+y=634 x-y=66   2x=700 x=350 

350+y=634  y=284
 A total of 634 tickets were sold for the school play. They were either adult tickets or student tickets. There were 66 fewer student tickets sold than adult tickets. How many adult tickets were sold?
So say adult sold would be x, then student sold would be x-66
add them

x+x-66=634 solve for x
2x=700 divide each side by 2
x=350
so 350 adult and 350-66=284 student

In a study of blood donors, 200 were classified as group O and 250 had a classification other than group O. What is the probability that a person will have group O blood? (Enter your answer as a fraction.)

Answers

Probability of O = (number with O)/(Total number of cases)

It always works like this.

P(O) = 200/450 = 4/9

Look at the quadratic equation below. x2 - 10x + 16 = -5 What is this quadratic equation written in standard form? A.5x2 + 10x - 16 = 0 B.5x2 - 10x + 16 = 0 C.x2 - 10x + 11 = 0 D.x2 - 10x + 21 = 0

Answers

ax^2+bx+c=0 is the standard form, so we add 5 to both sides to get 

1*x^2+(-10)x+21=0

18000 decrease by 15% every year for 3 years

Answers

1st year= 18000 x 0.85 = 15300
2nd year= 15300 x 0.85 = 13005
3rd year= 13005 x 0.85= 11054.25

Which system is equivalent to
y= 9x^2
x+y=5
?

Answers

Answer : Option A

Explanation:

we can clearly see that from x+ y=5 we can substitute  y = 5-x in y = 9x^2

Option B is clearly incorrect  x can not be y -5

Option C  is incorrect because y can not be 5 +x

Option D is incorrect because  its y = 9x^2 not y^2 =9x^2 so y can not be 3x

if its y^2 = 9x^2 then  only  implies y =  3x

Answer:

Option 1st is correct

[tex]5-x= 9x^2[/tex]

[tex]y = 5-x[/tex]

Step-by-step explanation:

Given the equations:

[tex]y = 9x^2[/tex]      .....[1]

[tex]x+y = 5[/tex]         .....[2]

We can write equation [2] as:

[tex]y = 5-x[/tex]

Now, substitute this y value in [1] we have;

[tex]5-x= 9x^2[/tex]

Therefore, the system which is equivalent to the given system equation is,

[tex]5-x= 9x^2[/tex]

[tex]y = 5-x[/tex]

Traveling at 65 miles/hour, how many feet can you travel in 22 minutes? How do you know?

Answers

65 miles per hour


feet in a mile: 5,280 ft


65 divided by 60= 1.08 miles per minute

22 x 1.08 = 23.76 miles

23.76 mi x 5,280 ft = 125,452.8 ft in 22 minutes
keeping in mind that there are 5280 feet in 1 mile, and 60 minutes in 1 hour.

[tex]\bf \cfrac{65~\underline{miles}}{\underline{hr}}\cdot \cfrac{5280~ft}{\underline{miles}}\cdot \cfrac{\underline{hr}}{60~min}\implies \cfrac{65\cdot 5280~ft}{60~min}\implies \cfrac{343200~ft}{60~min} \\\\\\ 5720\frac{ft}{min}[/tex]

now, if you can do 5720 feet in 1 minute, how many can you travel in 22 minutes?

well, just 22 * 5720.

Draw a quadrilateral with the given description

A rhombus with 6-centimeter sides and two 80 degree angles

Answers

By definition, a quadrilateral is a general term for a parallelogram and a rhombus. They are both 4-sided two-dimensional shapes with two sets of parallel sides. However, a rhombus is a special case. It has equal sides. Consequently, all its angles are equal. Therefore, the resultant drawing is alike to what's in the attached picture. But technically, all its sides are equal to 6 cm and all its angles are equal to 80°.

Answer:

Step-by-step explanation:

By definition, a quadrilateral is a general term for a parallelogram and a rhombus. They are both 4-sided two-dimensional shapes with two sets of parallel sides. However, a rhombus is a special case. It has equal sides. Consequently, all its angles are equal. Therefore, the resultant drawing is alike to what's in the attached picture. But technically, all its sides are equal to 6 cm and all its angles are equal to 80°.

24x2+25x−47=(−8x−3)(ax−2)−53

Answers

hello : 
the question is : find : a 
24x²+25x−47=(−8x−3)(ax−2)−53
                      = -8ax²+16x-3ax +6-53
                       =  -8ax²+16x-3ax  - 47

24x²+25x−47= -8ax² + (16-3a)x -47
so : -8a = 24
       16-3a =25
a = 24/-8 = -3
16-3(-3) =25...right
conclusion : a = = -3

james put $1000 in a 2-year CD paying 7% interest, compounded monthly.

Answers

To find the future value of this investment the formula is
A=p (1+r/k)^kt
A future value?
P present value 1000
R interest rate 0.07
K compounded monthly 12
T time 2 years
A=1,000×(1+0.07÷12)^(12×2)
A=1,149.81

Answer with explanation:

Principal = $ 1000

Time = 2 years

Rate of Interest = 7 %

Since of rate of interest is compounded monthly,

then, [tex]R=\frac{7}{12}\\\\T=2 \times 12 =24[/tex]

Amount after 2 years

 [tex]=P\times [1 +\frac{R}{100}]^T\\\\=1000 \times [1+\frac{7}{1200}]^{24}\\\\=1000 \times [\frac{1207}{1200}]^{24}\\\\=1000 \times (1.00583)^{24}\\\\=1000\times 1.14972\\\\=1149.72[/tex]

Amount after 2 years, when rate of interest, is compounded monthly=$ 1149.72  

Use the direct variation equation y=x/4 to solve for x when y =60

Answers

We have to solve for x when the equation is y = x / 4 and y = 60. We will charge y = 60 into the function:
60 = x / 4
or:
60 = x : 4
x = 60 * 4
Answer:  x = 240

A salesperson earns a base salary of $36,000 plus 2 1/2% commission on sales. His total sales for one year was $500,000. Find the salesperson's total pay for that year.

Answers

The answer would be 48,500. 
Final answer:

To calculate the salesperson's total annual pay, we add the commission earned from the total sales to the base salary. The commission is $12,500, and the base salary is $36,000, resulting in a total pay of $48,500.

Explanation:

The question asks us to determine the total pay for a salesperson with a base salary and a commission percentage on total sales. To find the salesperson's total pay for a year, we calculate the commission earned from total sales and add it to the base salary. The salesperson's commission is 2 1/2% of $500,000, which can also be written as 0.025. We calculate the commission by multiplying 0.025 by $500,000, which equals $12,500. Therefore, the total pay for the salesperson for that year is the sum of the base salary of $36,000 plus the commission of $12,500, which gives us $48,500.

For his long long distance phone service Chris pays a $6 monthly fee plus 8 cents per minute. Last month, Chris's long distance bill was $11.52. For how many minutes was Chris billed

Answers

total bill would be X=6.00 +0.08m

where m = minutes

X = total bill

so 11.52 = 6.00+0.08m

subtract 6 from each side

5.52 = 0.08m

 now divide both sides by 0.08

5.52/0.08 = 69

 he was billed for 69 minutes.

Sixty dash fivesixty-five percent of households say they would feel secure if they had? $50,000 in savings. you randomly select 88 households and ask them if they would feel secure if they had? $50,000 in savings. find the probability that the number that say they would feel secure is? (a) exactly? five, (b) more than? five, and? (c) at most five.

Answers

 To solve the following problems, we use the binomial probability equation:

P (r) = [n!/(n-r)! r!] p^r q^(n-r)

where,

n = total number of households = 8

r = number of sample

p = probability of success = 65% = 0.65

q = probability of failure = 0.35

 

A. r = 5

P (r=5) = [8! / 3! 5!] 0.65^5 0.35^3

P (r=5) = 0.28

 

B. r >5

P (r=6) = [8! / 2! 6!] 0.65^6 0.35^2

P (r=6) = 0.26

P (r=7) = [8! / 1! 7!] 0.65^7 0.35^1

P (r=7) = 0.14

P (r=8) = [8! / 0! 8!] 0.65^8 0.35^0

P (r=8) = 0.03

Therefore total is:

P (r>5) = 0.26 + 0.14 + 0.03 = 0.43

 

C. r ≤ 5

P (r ≤ 5) = 1 - P (r>5)

P (r ≤ 5) = 1 – 0.43

P (r ≤ 5) = 0.57

 

 

Other Questions
Which of the following is equivalent to 513^3?A) 13^2B) 13^15C) 13^5/3D) 13^3/5 How did humans and the world come to existence according to persian mythology? Donna and Phyllis are reviewing for a math final. They have 150 pages to cover. Donna can review 37 pages an hour, but Phyllis can only go2/3as fast as Donna. About how long does it take each girl to finish? If the fed engages in open market sales in direct response to an increase in the rate of inflation, this is known as Running down the hill is a complete sentencefragment True or False: Wikipedia pages should get high ratings for all user intents because information is always helpful. The brightness of a variable star adds a component to the simple harmonic motion we have studied in this lesson. Since the brightness is variable the vertical axis may no longer be equal to zero. Also included in the variance is a phase shift. In this case, the equation for this function would be: y = a cos w(t c ) + b.Suppose we have a variable star whose brightness alternately increases and decreases. For this star, the time between periods of maximum brightness is 6.5 days. The average brightness (or magnitude) of the star is 5.0 and its brightness varies by + 0.25 magnitude.1. What is the amplitude of the function for this model?2. What is the period?3. What is w?4. What is the vertical shift?5. Is there a phase shift? If so, what is it?6. What is the function how do you write 20484163 in different forms What does the lack of punctuation in William Carlos Williams's "Landscape with the Fall of Icarus" do to the pacing of the poem 1. Mi familia y yo (cocinar) todos los das.2. Yo (trabajar) mucho.3. Cmo se dice "midnight" en espaol? What does the reign of tiberius demonstrate about roman government? What type of policy would only provide coverage for specific types of illnesses (cancer, stroke, etc)? mewa blanket insurance dread disease insurance disability insurance? Calculate the acceleration of a 300,000-kg jumbo jet just before takeoff when the thrust on the aircraft is 120,000 n. Which of the following is true about the religious practices of ancient China and the ancient Indus valley civilization? Calciums atomic number is 20. it forms ions with 18 electrons. what is the electrical charge of a calcium ion? Boundary Peak in Nevada is 13,000 feet high. Guadalupe Peak in Texas is 8,749.75 feet high. How much higher than Guadalupe Peak is Boundary Peak? Round your answer to match the less precise measurement. find the arc length of a central angle of 90 in a circle whose radius is 4 inches How to factor a polynomial when the leading coefficient isn't 1 Mr. Adams asked his students to write the chemical symbols for the element zinc. He wrote the student's answers on the whiteboard. Which answer is correct? American car makers produce 5,650,000 cars each year. In a report, Ben wrote that Americans made 6,550,000 cars. What mistake did Ben make? How can he fix it? Find the error. Steam Workshop Downloader