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
Fluorescent troffers are a type of _ lighting fixture
creativ13 [48]
The answer would be letter A
8 0
3 years ago
In the fully developed region of flow in a circular pipe, does the velocity profile change in the flow direction?
taurus [48]

Answer:

<em>No, the velocity profile does not change in the flow direction.</em>

Explanation:

In a fluid flow in a circular pipe, the boundary layer thickness increases in the direction of flow, until it reaches the center of the pipe, and fill the whole pipe. If the density, and other properties of the fluid does not change either by heating or cooling of the pipe, <em>then the velocity profile downstream becomes fully developed, and constant, and does not change in the direction of flow.</em>

3 0
3 years ago
The thermal efficiency of two reversible power cycles operating between the same thermal reservoirs will a)- depend on the mecha
mestny [16]
C ,, i’m pretty sure .
4 0
3 years ago
state &amp; prove parallelogram law of vector addition &amp;Also determine magnitude &amp;direction of resultant vector.​
ludmilkaskok [199]

Answer:

Parallelogram law of vector addition states that if two vectors are considered to be the adjacent sides of a parallelogram, then the resultant of the two vectors is given by the vector that is diagonal passing through the point of contact of two vectors.

8 0
3 years ago
The given family of functions is the general solution of the differential equation on the indicated interval.Find a member of th
Alja [10]

Answer:

Explanation:

y'''+y=0---(i)

General solution

y=c_1e^o^x+c_2\cos x +c_3 \sin x\\\\\Rightarrow y=c_1+c_2 \cos x+c_3 \sin x---(ii)\\\\y(\pi)=0\\\\\Rightarrow 0=c_1+c_2\cos (\pi)+c_3\sin (\pi)\\\\\Rightarrow c_1-c_2=0\\\\c_1=c_2---(iii)

y'=-c_2\cos x+c_3\cosx\\\\y'(\pi)=2\\\\\Rightarrow2=-c_2\sin(\pi)+c_3\cos(\pi)\\\\\Rightarrow-c_2(0)+c_3(-1)=2\\\\\Rightarrow c_3=-2\\\\y''-c_2\cos x -c_3\sin x\\\\y''(\pi)=-1\\\\\Rightarrow-1=-c_2 \cos (\pi)=c_3\sin(\pi)\\\\\Rightarrow-1=c_2-0\\\\\Rightarrow c_2=-1

in equation (iii)

c_1=c_2=-1

Therefore,

\large\boxed{y=-1-\cos x-2\sin x}

5 0
3 years ago
Other questions:
  • You are an engineer working in a auto crash test lab. Some members of your team have raised objections against the use of cadave
    10·1 answer
  • What is the magnitude of the maximum stress that exists at the tip of an internal crack having a radius of curvature of 2.5×10-4
    13·1 answer
  • In Engineering, what is a shoulder on a bridge?
    8·1 answer
  • Consider the gas carburizing of a gear of 1018 steel (0.18 wt %) at 927°C (1700°F). Calculate the time necessary to increase the
    12·1 answer
  • Zionjasean17 zionjasean17
    8·2 answers
  • Which permission do you need to shoot on the owner’s property?
    8·1 answer
  • Pointttttttttttttssssssssssss
    12·1 answer
  • The size of an engine is called the engine
    13·2 answers
  • In a long trip what is considered a life line to take with you.
    12·1 answer
  • 3. If nothing can ever be at absolute zero, why does the concept exist?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!