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
Car insurance incentives and discounts are available depending on _____. A. school attendance and driver skill B. vehicle type a
WARRIOR [948]

Answer:D. Location, vehicle type, and driving habits

5 0
3 years ago
Read 2 more answers
At a certain location, wind is blowing steadily at 5 mph. Suppose that the mass density of air is 0.0796 lbm/ft3 and determine t
nlexa [21]

Answer:

The radius of a wind turbine is 691.1 ft

The power generation potential (PGP) scales with speed at the rate of 7.73 kW.s/m

Explanation:

Given;

power generation potential (PGP) = 1000 kW

Wind speed = 5 mph = 2.2352 m/s

Density of air = 0.0796 lbm/ft³ = 1.275 kg/m³

Radius of the wind turbine r = ?

Wind energy per unit mass of air, e = E/m = 0.5 v² = (0.5)(2.2352)²

Wind energy per unit mass of air = 2.517 J/kg

PGP = mass flow rate * energy per unit mass

PGP = ρ*A*V*e

PGP = \rho *\frac{\pi r^2}{2} *V*e  \\\\r^2 = \frac{2*PGP}{\rho*\pi *V*e} , r=\sqrt{ \frac{2*PGP}{\rho*\pi *V*e}} = \sqrt{ \frac{2*10^6}{1.275*\pi *2.235*2.517}}

r = 210.64 m = 691.1 ft

Thus, the radius of a wind turbine is 691.1 ft

PGP = CVᵃ

For best design of wind turbine Betz limit (c) is taken between (0.35 - 0.45)

Let C = 0.4

PGP = Cvᵃ

take log of both sides

ln(PGP) = a*ln(CV)

a = ln(PGP)/ln(CV)

a = ln(1000)/ln(0.4 *2.2352) = 7.73

The power generation potential (PGP) scales with speed at the rate of 7.73 kW.s/m

5 0
3 years ago
Who here is a genius?
Pachacha [2.7K]

Answer:

im kinda smart  whyy?

Explanation:

3 0
3 years ago
Read 2 more answers
How is the energy harnessed and converted into useful energy?
garri49 [273]

Answer:

1. How energy is harnessed?  

Another way to tap solar energy is by collecting the sun's heat. Solar thermal power plants use heat from the sun to create steam, which can then be used to make electricity. On a smaller scale, solar panels that harness thermal energy can be used for heating water in homes, other buildings, and swimming pools.

2. How is solar energy converted into useful energy?

Solar panels convert the sun's light into usable solar energy using N-type and P-type semiconductor material. When sunlight is absorbed by these materials, the solar energy knocks electrons loose from their atoms, allowing the electrons to flow through the material to produce electricity.

Explanation:

hope it helps, please mark as brainliest

6 0
3 years ago
A circular column is fixed at the base and not supported at the top. If the column needs to be 15ft and hold 10kips, what is the
muminat

Answer:

The required size of column is length = 15 ft and diameter = 4.04 inches

Explanation:

Given;

Length of the column, L = 15 ft

Applied load, P = 10 kips = 10 × 10³ Psi

End condition as fixed at the base and free at the top

thus,

Effective length of the column, \L_e = 2L = 30 ft = 360 inches

now, for aluminium

Elastic modulus, E = 1.0 × 10⁷ Psi

Now, from the Euler's critical load, we have

P =\frac{\pi^2EI}{L_e^2}

where, I is the moment of inertia

on substituting the respective values, we get

10\times10^3 =\frac{\pi^2\times1.0\times10^7\times I}{360^2}

or

I = 13.13 in⁴

also for circular cross-section

I = \frac{\pi}{64}\times d^4

thus,

13.13 = \frac{\pi}{64}\times d^4

or

d = 4.04 inches

The required size of column is length = 15 ft and diameter = 4.04 inches

3 0
3 years ago
Other questions:
  • At a 4 percent annual growth rate in GDP per capita, it will take
    15·1 answer
  • In normal operation, a paper mill generates excess steam at 20 bar and 400◦C. It is planned to use this steam as the feed to a t
    14·1 answer
  • Consider a fully developed laminar flow in a circular pipe. The velocity at R/2 (midway between the wall surface and the centerl
    6·1 answer
  • The assembly consists of two blocks A and B, which have a mass of 20 kg and 30 kg, respectively. Determine the distance B must d
    14·2 answers
  • A six-lane divided highway (three lanes in each direction) is on rolling terrain with two access points per mile and has 10- ft
    7·1 answer
  • You are considering purchasing a compact washing machine, and you have the following information: The Energy Guide claims an est
    8·1 answer
  • Need help with both giving out brainlest for the people to help me
    13·1 answer
  • List six possible valve defects that should be included in the inspection of a used valve?
    7·1 answer
  • List the parts of a manual transmission <br><br> List the parts of a typical clutch assembly?
    14·1 answer
  • True or false for the 4 questions?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!