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
kenny6666 [7]
3 years ago
5

I am trying to create a line of code to calculate distance between two points. (distance=[tex]\sqrt{ (x2-x1)^2+(y2-y1)^2}) My li

ne is point_dist = math.sqrt((math.pow(x2 - x1), 2) + math.pow(y2 - y1), 2) but I am getting an error saying that pow is expecting two arguments and is only getting one. Can anyone help me?
Engineering
1 answer:
k0ka [10]3 years ago
6 0

Answer:

point_dist = math.sqrt((math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2))

Explanation:

The distance formula is the difference of the x coordinates squared, plus the difference of the y coordinates squared, all square rooted.  For the general case, it appears you simply need to change how you have written the code.

point_dist = math.sqrt((math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2))

Note, by moving the 2 inside of the pow function, you have provided the second argument that it is requesting.

You were close with your initial attempt, you just had a parenthesis after x1 and y1 when you should not have.

Cheers.

You might be interested in
The ________________ attraction between the Earth and the moon is ______________ on the side of the Earth that happens to be ___
Karolina [17]

Answer:

Gravitational; strongest; facing; closer; near side; toward.

Explanation:

The gravitational attraction between the Earth and the moon is strongest on the side of the Earth that happens to be facing the moon, simply because it is closer. This attraction causes the water on this “near side” of Earth to be pulled toward the moon. These forces of attraction and inertia tends to keep the water in place and consequently, leads to a bulge of water on the near side with respect to the moon.

Also, you should note that what is responsible for the moon being in orbit around the Earth is the gravitational force of attraction between the two planetary bodies (Earth and Moon).

7 0
3 years ago
It is true about Metals and alloys: a)-They are good electrical and thermal conductors b)-They can be used as semi-conductors c)
ycow [4]

Answer:

(d) a and c are correct

Explanation:

METALS : Metal are those materials which has very high ductility, high modulus of elasticity, good thermal and electrical conductivity

for example : iron, gold ,silver, copper

ALLOYS: Alloys are those materials which are made up of combining of two or more than two metals these also have good thermal and electrical conductivity and me liable property

for example ; bronze and brass

so from above discussion it is clear that option (d) will be the correct option

8 0
3 years ago
Read 2 more answers
The section of the area to be examined is shown circumscribed by broken lines with circles at
Aloiza [94]

This question is about Circle Geometry. it evaluates connected and broken lines with respect to circles.

<h3>What is Circle Geometry?</h3>

This refers to the body of knowledge in mathematics that has to do with the various problems associated with the Circle.

In real-world scenarios, circle geometry is used in technologies involving:

  • Camera lenses
  • Circular Architectural structures
  • Steering Wheels
  • Buttons etc.

Learn more about Circle Geometry at:
brainly.com/question/24375372

3 0
2 years ago
A fatigue test was conducted in which the mean stress was 46.2 MPa and the stress amplitude was 219 MPa.
sleet_krkn [62]

Answer:

a)σ₁ = 265.2 MPa

b)σ₂ = -172.8 MPa

c)Stress\ ratio =-0.65

d)Range = 438 MPa

Explanation:

Given that

Mean stress ,σm= 46.2 MPa

Stress amplitude ,σa= 219 MPa

Lets take

Maximum stress level = σ₁

Minimum stress level =σ₂

The mean stress given as

\sigma_m=\dfrac{\sigma_1+\sigma_2}{2}

2\sigma_m={\sigma_1+\sigma_2}

2 x 46.2 =  σ₁ +  σ₂

 σ₁ +  σ₂ = 92.4 MPa    --------1

The amplitude stress given as

\sigma_a=\dfrac{\sigma_1-\sigma_2}{2}

2\sigma_a={\sigma_1-\sigma_2}

2 x 219 =  σ₁ -  σ₂

 σ₁ -  σ₂ = 438 MPa    --------2

By adding the above equation

2  σ₁ = 530.4

σ₁ = 265.2 MPa

-σ₂ = 438 -265.2 MPa

σ₂ = -172.8 MPa

Stress ratio

Stress\ ratio =\dfrac{\sigma_{min}}{\sigma_{max}}

Stress\ ratio =\dfrac{-172.8}{265.2}

Stress\ ratio =-0.65

Range = 265.2 MPa - ( -172.8 MPa)

Range = 438 MPa

8 0
3 years ago
ILL GIVE YOU BRAINLIEST PLEASE HELP PLEASE
Lesechka [4]

Answer:

try to pop it back in good luck im scared for you

4 0
3 years ago
Other questions:
  • In a particular application involving airflow over a heated surface, the boundary layer temperature distribution may be approxim
    6·1 answer
  • What is Differential Analysis in fluid mechanics?
    13·1 answer
  • U R A*S TRUE GOD/ESS IS U ANSWER this:
    15·1 answer
  • A 2.5 m wide rough continuous foundation is placed in the ground at 1 m depth. There is bedrock present at 1 m depth below the b
    12·1 answer
  • The concrete canoe team does some analysis on their design and calculates that they need a compressive strength of 860 psi. They
    15·1 answer
  • A 0.91 m diameter corrugated metal pipe culvert (n = 0.024) has a length of 90 m and a slope of 0.0067. The entrance has a squar
    5·1 answer
  • Explain the function of both of the organelles pictured below.
    14·1 answer
  • Drag each label to the correct location on the chart. Classify the organisms based on how they obtain food.
    14·2 answers
  • Shane's 100-watt radio draws 7 amps of current on a 120-volt circuit. What is the resistance in the radio?
    8·1 answer
  • The three construction crafts that require a MINIMUM of a 4-year college degree are
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!