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
What is a network? I'LL MARK BRAINLEST
Jobisdone [24]

Answer:

hsjeeieoj eu sou ku nahi u have UCC guide to buying it and I he was a temporary password for bees and u h ki tarah nahi to ye sab se jyada nahi hota nahi to kabhi bhi hai ki wo to sirf Tum nahi hota

7 0
2 years ago
Read 2 more answers
What material property would still cause strain in a strain gauge that is positionedperpendicular to the direction of force if i
svetlana [45]

Answer:

oof

Explanation:

I don't know but please don't report me

I am trying to do a challenge

Thank you-

If you don't report me!

5 0
3 years ago
If something is 50fficient, how many joules of wasted energy will there be if 750j of energy is put in?’
Sedbober [7]

Efficiency is the minimum use of energy to accomplish the task. The wasted energy will be 375 J when 750 J of energy is given.

<h3>What is wasted energy?</h3>

Wasted energy is energy that is not useful when the transformation in the system occurs.

Total energy = 750 J

The efficiency of the system = 50 %

Output work (OW) is calculated as:

Efficiency = output work ÷ input work × 100%

750 × 50 = 100 OW

OW = 375 J

Wasted energy = Total energy - output work

= 750 - 375

= 375 J

Therefore, the machine is 50 % inefficient and has wasted energy of 375 J.

Learn more about wasted energy here:

brainly.com/question/16177264

#SPJ4

8 0
2 years ago
What can your employer do to protect you from overhead power lines?
agasfer [191]

Answer:

Have the power company install insulated sleeves (also known as “eels”) over power lines.​

Wearing PPE is the only way to prevent being electrocuted

Explanation:

To prevent electrocution at workplace, employers can ensure that the  power company install insulated sleeves (also known as “eels”) over power lines.​ Additionally, the employees should wear PPEs which are insulators to prevent electrocution.

5 0
3 years ago
Are front-end engineers starting to decline in China?
laiz [17]

Yes. They are declining in China. Very fast

7 0
3 years ago
Other questions:
  • If a steel cable is rated to take 800-lb and the steel has a yield strength of 90,000psi, what is the diameter of the cable?
    12·1 answer
  • Assuming that the following three variables have already been declared, which variable will store a Boolean value after these st
    14·1 answer
  • It has been estimated that 139.2x10^6 m^2 of rainforest is destroyed each day. assume that the initial area of tropical rainfore
    12·1 answer
  • 10. True or False: You should select your mechanic before you experience vehicle failure.
    6·2 answers
  • 2.31 LAB: Simple statistics Part 1 Given 4 integers, output their product and their average, using integer arithmetic. Ex: If th
    5·2 answers
  • Exercise 5.46 computes the standard deviation of numbers. This exercise uses a different but equivalent formula to compute the s
    12·1 answer
  • Q#3:(A)Supose we extend the circular flow mode to add imports and export copy the circular flow digram onto a sheet paper and th
    15·1 answer
  • What is one major life lesson you learned from the movie; ¨Spare Parts¨
    6·2 answers
  • You apply a force of 19 lbs on to the end of a lever to lift a crate. The resistance of the load is 106 lbs. Calculate the
    13·1 answer
  • Connect wires to make the correct logic outputs.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!