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) should 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

Answers

Answer 1

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:

[tex]32, 32, 54, 12 \to 29.73[/tex]

[tex]52,56,8,30 \to 51.11[/tex]

[tex]44,94,44,39\to 55.00[/tex]

[tex]19,51,91,7.5 \to 84.12[/tex]

[tex]89,34,00,00 \to 95.27[/tex]


Related Questions

Who is MrBeast?
Answer the question correctly and get 10 points!

Answers

Answer: MrBeast is a y0utuber who has lots of money

Explanation:

Answer:

He is a You tuber who likes to donate do stunts and best of all spend money.

It's like he never runs out of money.

Explanation:

Write a Java program named Problem 3 that prompts the user to enter two integers, a start value and end value ( you may assume that the start value is less than the end value). As output, the program is to display the odd values from the start value to the end value. For example, if the user enters 2 and 14, the output would be 3, 5, 7, 9, 11, 13 and if the user enters 14 and 3, the output would be 3, 5, 7, 9, 11, 13.

Answers

Answer:

hope this helps

Explanation:

import java.util.Scanner;

public class Problem3 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter start value: ");

       int start = in.nextInt();

       System.out.print("Enter end value: ");

       int end = in.nextInt();

       if (start > end) {

           int temp = start;

           start = end;

           end = temp;

       }

       for (int i = start; i <= end; i++) {

           if (i % 2 == 1) {

               System.out.print(i);

               if (i == end || i + 1 == end) {

                   System.out.println();

               } else {

                   System.out.print(", ");

               }

           }

       }

   }

}

what is a web client​

Answers

Answer:

A Web client typically refers to the Web browser in the user's machine or mobile device. It may also refer to extensions and helper applications that enhance the browser to support special services from the site.

hope this helps

have a good day :)

Explanation:

A Web client typically refers to the Web browser in the user's machine or mobile device. It may also refer to extensions and helper applications that enhance the browser to support special services from the site.

Here's an example:

Your web browser is an example of a web client. The remote machine containing the document you requested is called a web server. The client and server communicate using a special language (a "protocol") called HTTP.

Good luck!

Explaining Invalid Data
what happens if date is entered in a feld without meeting the validation mal

Answers

Answer:

An error appears and the record cannot be saved

Explanation:

edge 2021


List any two programs that are required to play multimedia products
List any two programs that are required to create multimedia products​

Answers

Answer:

the two programs to play multimedia products are;windows media player and VLC media player and the two programs to create multimedia products are;photoshop and PowerPoint

write a object oriented c++ program

Answers

Answer:

I don't know how to code C++

Explanation:

How can technical writers help readers focus on important information in a set of instructions?
Technical writers can bring a reader's attention to important details in a set of instructions by ___.

1. adding an explanation and caution
2. using a highlighting technique
3. repeating the information
4. adding graphics to the introduction

Answers

Answer:

2. using a highlighting technique

Explanation:

highlighting is for to draw attention

Write a function template that accepts an argument and returns its absolute value. The absolute value of a number is its value with no sign. For example, the absolute value of -5 is 5, and the absolute value of 2 is 2. Test the template in a simple driver program being sure to send the template short, int, double, float, and long data values.

Answers

Answer:

The function in Java is as follows:

public static double func(double num){

       num = Math.abs(num);

       return num;

   }

Explanation:

This defines the function

public static double func(double num){

This determines the absolute function of num

       num = Math.abs(num);

This returns the calculated absolute value

       return num;

   }

Complete the sentence.
In your program, you can open

Answers

In your program, you can open a file using the open() function in Python.

What is the program about?

A high-level, all-purpose programming language is Python. Code readability is prioritized in its design philosophy, which makes heavy use of indentation. Python uses garbage collection and has dynamic typing.

It supports a variety of programming paradigms, such as functional, object-oriented, and structured programming. The open() function in Python allows you to open a file, read its contents, and perform various operations on it, such as writing, appending, etc.

Learn more about program on:

https://brainly.com/question/26642771

#SPJ1

Why is it important to isolate evidence-containing devices from the internet?
To save the battery
To hide their location
Devices can be remotely locked or wiped if connected
It is not important to isolate the devices

Answers

Answer:

C.

Devices can be remotely locked or wiped if connected

Explanation:

Other Questions
No random links or answers, please. Work out the area of this circle. Take pi to be 3.142 and give your answer to 1 decimal place radius is 4cm What happen after you drink mineral water, does it go to kidney and how it get removed Why is the classification species not considered a group Solve: 2x-4 = -(x-6)/2 There are 8 roses in a vase of 14 flowers. The rest are daisies.(a) What is the ratio of roses to daisies?(b) What is the ratio of all flowers in the vase to daisies? Select the correct answer.What is the value of this expression if h = 8, j = -1, and k= -12?. 3B12 C.36D-12PLEASE HELP ME HELP _7. All of the following except which would lead to an INCREASE in friction?A. string rubbing on woodC. axles fitting very snuggly in axle holesB. graphite powderD. wheels tight against the wood side rails What defense did Albert Speer offer at the Nuremberg trials? Ciana Thomas drove her car 11,500 miles last year. Her fixed costs totaled $1,214 and her variable costs totaled $2,450. What was her cost per mile? Identify the constant term in the expression:2x + y + 3z + 5 pls help it's about density A self-driving car traveling along a straight section of road starts from rest, accelerating at 2.00 m/s2 until it reaches a speed of 25.0 m/s. Then the vehicle travels for 39.0 s at constant speed until the brakes are applied, stopping the vehicle in a uniform manner in an additional 5.00 s. (a) How long is the self-driving car in motion (in s)? (b) What is the average velocity of the self-driving car for the motion described? (Enter the magnitude in m/s.) m/s Here possible, it is advisable or even important to keep supply chains as short and simple as possible: Options: 1: the shorter the supply chain, the better for the business 2: an extended supply chain is often advantageous Find the missing length indicated. Leave your answer as radicals in simplest formPlease help, no links The table shows the test scores of students who studied for a teat as a group (group a) and students who studied individually (group b). Which would be the best measures of center and variation to use to compare the data? What was the primary goal of the Virginia Company?-))A)to build the infrastructure necessary for the Virginia Colony to flourisheconomicallyB)to obtain for England valuable natural resources from the Americancoloniesto improve relationships between colonists and American IndiansD)to acquire laborers from the colonies to work in British factories PLEASE HELP MEWhich of the following best describes a forest dense with oak and hickory trees that change color and has a floor thick with leaf litter? A. tropical rain forest B. coniferous forest C. deciduous forest D. savanna What is an origination fee on a loan? If Mr. Donahue bought 10 cookies for $8.00. At this rate, how muchwould it cost for 25 cookies?