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 position of a particle is given by s = 0.27t
Natali [406]
Sorry bro people do this22.2 pls
8 0
2 years ago
1.Which thematic group uses technology to direct the behavior of dynamical systems, ensuring that they behave in a predictable m
dsp73

The thematic group governing the behavior of dynamic system is control system, and the one packaging the miniature components to conduct electricity is electronic system. Thus, option E is correct.

<h3>What are thematic groups?</h3>

The thematic groups comprises of group of people that work over the same idea or the concept. The thematic groups working on different projects and ideas comprised to work with different systems.

The control of dynamic system in order to produce the desirable outcome has been the role of the control system.

The packaging of the electronic miniatures in system that performs the role of direction of electricity is the role of electronic system thematic group. Thus, option E is correct.

Learn more about thematic group, here:

brainly.com/question/32731

#SPJ1

8 0
2 years ago
In order to defend against side channel power analysis, we should: ______________
wariber [46]

Answer:

Some examples of predator and prey are lion and zebra, bear and fish, and fox and rabbit. ... The words "predator" and "prey" are almost always used to mean only animals that eat animals, but the same concept also applies to plants: Bear and berry, rabbit and lettuce, grasshopper and leaf

Explanation:

8 0
3 years ago
Source of energy in wind power <br><br>​
ohaa [14]

The energy in which wind is used to generate electricity is known as wind energy. Wind turbines convert the kinetic energy in the wind into mechanical power. This mechanical power is then used for various purposes. Wind energy is a free and renewable resource. It is a clean and non-polluting source of energy.

3 0
2 years ago
.) If the charges attracting each other in the problem above have equal magnitude, what is the magnitude of each charge?
Sedaia [141]

Answer:

Not seeing any other information, the best answer I can give is 2m.

Explanation:

M = magnitude

You see, if they have an equal charge, and you add them, it'd be 2 * m, or 2m.

8 0
3 years ago
Other questions:
  • Technician A says amperage cannot exist without both voltage and resistance. Technician B says if amperage is high, then you kno
    6·1 answer
  • Energy transfer in mechanical systems: During steady-state operation, a mechanical gearbox receives 70 KW of input power through
    9·1 answer
  • Show that -40 F is approximately equal to -40 C.
    12·1 answer
  • A bolt is tightened, subjecting its shank to a tensile stress of 80 kpsi and a torsional shear stress of 50 kpsi at a critical p
    7·1 answer
  • Cavitation usually occurs because:
    15·1 answer
  • Which of the following machine parts always require
    12·1 answer
  • Document the XSS stored exploit script: Use the View Source feature of the web page and create a screenshot of the few lines cod
    15·1 answer
  • Many households in developing countries prepare food over indoor cook stoves with no ducting system to exhaust the combustion pr
    11·1 answer
  • What’s cat plus cat <br><br><br><br><br><br><br><br> ?
    9·2 answers
  • FAST PLLZZ!! Ideally, the backrest is tilted back slightly, so when you turn the wheel your shoulders are _______ the seat.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!