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
Mariana [72]
3 years ago
15

Write a function to calculate the distance between two points Distance( x1, y1,x2.2) For example Distance(0.0,3.0, 4.0.0.0) shou

ld return 5.0 Use the function in main to loop through reading in pairs of points until the all zeros are entered printing distance with two decimal precision for each pair of points.
For example with input
32 32 54 12
52 56 8 30
44 94 4439 6
5 19 51 91 7.5
89 34 0000
Your output would be:__________.
a. 29.73
b. 51.11
c. 55.00
d. 73.35
e. 92.66
Computers and Technology
1 answer:
Ivenika [448]3 years ago
4 0

Answer:

The function in Python3  is as follows

def Distance(x1, y1, x2, y2):

   dist = ((x1 - x2)**2 +(y1 - y2)**2)**0.5

   return dist

   

Explanation:

This defines the function

def Distance(x1, y1, x2, y2):

This calculates distance

   dist = ((x1 - x2)**2 +(y1 - y2)**2)**0.5

This returns the calculated distance to the main method

   return dist

The results of the inputs is:

32, 32, 54, 12 \to 29.73

52,56,8,30 \to 51.11

44,94,44,39\to 55.00

19,51,91,7.5 \to 84.12

89,34,00,00 \to 95.27

You might be interested in
After assembling a computer system the very first software to be installed is​
tatyana61 [14]

Answer:

operating system is the very first

after assembling a computer system the very first software to be installed is

8 0
4 years ago
Read 2 more answers
25 POINTS + BRAINLIEST PLS HELPWhere should you put the argument for a command?
Maslowich

d. on. the. line. just. after the. command

8 0
3 years ago
Which code snippet calculates the sum of all the even elements in an array values? Group of answer choices int sum = 0; for (int
olganol [36]

Answer:

The second one:

int sum = 0; for (int i = 0; i < values.length; i++) { if ((values[i] % 2) == 0) { sum += values[i]; } }

5 0
3 years ago
Jason needs to create a storyboard for his school's web page. Which should he include? A:Code B:Exact text C:HTML D:Purpose
Marina CMI [18]

Answer:

He should include Purpose of the storyboard.

Explanation:

A website storyboard contains all the information provided on website. This information is just on single page that contains all  important images, text, navigation and graphics. It is just the layout of the website to present it before clients.

The only things that is important, to create the storyboard of the website is why someone creating the storyboard. The purpose should be added in storyboard to present it before the users or client so that they can understand the purpose of storyboard.

4 0
4 years ago
Read 2 more answers
1. The _______ button automatically displays next to the data when you select a range of numeric data, which is an available opt
hichkok12 [17]
Quick Analysis tool - A tool that displays in the lower right corner of a selected range with which you can analyze your data by using Excel tools, such as, charts, color-coding, and formulas.



Recommended Charts- An excel feature that displays a set of charts according to Excel's calculations, will best fit your data based on the range of the data that you select.


Chart Style - The overall look of a chart in terms of it's graphic effects colors, and backgrounds; for example, you can have flat or beveled columns, colors that are solid or transparent, and back grounds that are dark or light.


Chart Elements Button - A button that enables you to add, remove, or change chart elements, such as, the title, legend, gridlines, and data labels.



Chart - Is the graphic representation of data in a worksheet; data presented as a chart is usually easier to understand than a table of numbers.





Hope this helps.

Pick your best choice, now that it's broken down for you!


5 0
4 years ago
Other questions:
  • Materials that allow electricity to flow are called A) Metals B) Attractors C) Conductors D) Insulators
    11·2 answers
  • How many nibbles are in 18 bytes??
    5·1 answer
  • What is the command to use the memory diagnostics tool?
    11·1 answer
  • Which is a tool that allows you to copy formatting from one place and apply it to other places?
    9·1 answer
  • Describe data center technology and its relevance to modern-day cloud computing
    14·1 answer
  • A (an) block can arise from set ways of thinking.
    15·1 answer
  • A set of object that share a common structure and common behavior in database is called ​
    13·1 answer
  • The compiler decides which version of a polymorphic method to call at compile time
    9·1 answer
  • I want know answer for best way to copy formula on MS Access
    10·1 answer
  • Online banking is a convenience that mostly affects which area of your life?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!