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
Luba_88 [7]
3 years ago
12

Write a program that prompts the user to enter two points (x1, y1) and (x2, y2) and displays their distance between them. The fo

rmula for computing the distance is: Square root of ((x2 - x1) squared + (y2 - y1) squared) Note that you can use pow(a, 0.5) to compute square root of a.
Computers and Technology
1 answer:
dezoksy [38]3 years ago
4 0

Answer:

x1 = input("enter x value of first number: ")

y1 = input("enter y value of first number: ")

x2 = input("enter x value of second number: ")

y2 = input("enter y value of second number: ")

ans = (float(x2)-float(x1))**2 + (float(y2)-float(y1))**2

ans = pow(ans, 0.5)

print(ans)

You might be interested in
Given a scanner reference variable named input that has been associated with an input source consisting of a sequence of strings
Makovka662 [10]

The code that examines all the strings in the input source and determines how long the longest string (or strings are) is the following:

total = 0; % initial value is zero, in every while loop it will be incremented

while(input.hasNextInt()){

total += input.nextInt( );

}

7 0
3 years ago
Read 2 more answers
A web designer is creating a web site and wants each browser to resize the text size to look the same in each device. what measu
adelina 88 [10]
The designer could use the measurements in pixels. 
4 0
3 years ago
What kind of eolr would you need to not have a open trouble on the facp
zhannawk [14.2K]

Answer:

here are three basic categories for fire alarm panel signals: trouble, supervisory, and alarm. Trouble Signal. A trouble signal is typically designated by a yellow light and means that there is an operational issue. For some more advanced systems, the panel may indicate the kind of problem and where it is located.

Explanation:

8 0
3 years ago
From an intraindividual perspective, the causes of aggression in intimate relationships:____________.
OLEGan [10]

Answer:

How partners in a relationship differ in a way that would cause them to contribute differently to the aggression that occurs between them.

Explanation:

Aggression in an intimate relationship is a negative response to environmental stimuli of individual. Two types of aggression are unilateral and bilateral aggression.

Aggression in a relationship can be view from different perspective, namely, interpersonal perspective, intra-individual perspective and sociocultural perspective.

3 0
3 years ago
Scanner can be used to read tokens from a String literal Scanner can be used to read tokens from the console window (user input)
Paladinen [302]

Answer:

Scanner can be used to read tokens from the console window (user input)

Explanation:

Scanner is a class used in some programming languages to obtain inputs from users.

It is mostly well developed in Java programming language and used exclusively for taking and obtaining inputs.

Scanner takes input in primitive types such as doubles, floats and integers. IT also takes string inputs.

Here is a code snippet where the class scanner is used:

         Scanner input = new Scanner (System.in)

The code above creates an object of the scanner class

7 0
4 years ago
Other questions:
  • ________ are used to translate each source code instruction into the appropriate machine language instruction.
    11·1 answer
  • If an Administrator performs a clean install of Windows Server 2012 R2 on a new server, and then moves critical domain services
    9·1 answer
  • Hello my friends i am trying to reboot my i phone 4 but i could not i tried many ways can u help me
    14·1 answer
  • All computers perform disk optimization utilizing the same software.<br><br> true <br> false
    11·1 answer
  • Digital on a smart phone means the camera is actually zooming in on the photo itself not the subject that you are shooting true
    8·1 answer
  • Why is distance learning better
    12·2 answers
  • Mobile computing is growing in importance each and every day, and the IT manager must take that into account. Do some web resear
    14·1 answer
  • HELP FAST PLS<br> Do you care more about avoiding fees/costs, accumulating perks, convenience, etc?
    14·2 answers
  • Koi jinda hei kya hello​
    13·2 answers
  • Who designed the apple i computer in 1976?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!