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
yanalaym [24]
3 years ago
5

function travelSpeed = CalculateTravelSpeed(startX, startY, endX, endY, travelTime) % startX, startY: Starting coordinates % end

X, endY: Ending coordinates % travelTime: Travel time in hours % Write an anonymous function to compute distance given two coordinates % Function name: EuclideanDist % Function inputs: x1, y1, x2, y2 % EuclideanDist = ... % Do not modify the statement below travelSpeed = EuclideanDist(startX, startY, endX, endY) / travelTime; end
Mathematics
1 answer:
Ilia_Sergeevich [38]3 years ago
5 0

Answer:

The functions in Python is as follows:

from math import *

def CalculateTravelSpeed(startX,startY,endX,endY,travelTime):

   travelSpeed = EuclideanDist(startX, startY, endX, endY) / travelTime

   return travelSpeed

def EuclideanDist(startX, startY, endX, endY):

   dist = sqrt((startX - endX)**2 + (startY - endY)**2)

   return dist

Step-by-step explanation:

from math import *

This defines the CalculateTravelSpeed function

def CalculateTravelSpeed(startX,startY,endX,endY,travelTime):

This calls the EuclideanDist function to calculate the distance; Next, the speed is calculated

   travelSpeed = EuclideanDist(startX, startY, endX, endY) / travelTime

This returns the calculated speed

   return travelSpeed

This defines the EuclideanDist function

def EuclideanDist(startX, startY, endX, endY):

This calculates the distance from the given coordinates

   dist = sqrt((startX - endX)**2 + (startY - endY)**2)

This returns the calculated distance

   return dist

You might be interested in
A movie theater charges 10.50 per ticket and 5 per bucket of popcorn
yarga [219]
15.50 one movie ticket and one bucket popcorn
7 0
3 years ago
Read 2 more answers
SOORY but I need help
olga55 [171]

Answer:

C.) Stop C and Stop D

Hope This Helps!      Have A Nice Day!!

8 0
3 years ago
Choose the equation of the line that is parallel to the x-axis.
True [87]

Answer:

y = 4

Step-by-step explanation:

y = 4

The line will always go along y = 4 and therefore is parallel to the x axis

7 0
4 years ago
Read 2 more answers
Tony's club is selling oranges to raise money .For e
damaskus [11]
Let x = the number of boxes they need to sell to get to 180
(1 1/8) * x + 75*(1 1/8) = 180 There's a number of ways you could solve this. I think the easiest way (or the easiest to explain) is to start by converting 1 1/8 to a decimal

1/8 = 0.125
1 1/8 = 1 + 0.125
1 1/8 = 1.125 Put this result in the equation.
1.125x + 75 * 1.125 = 180
1.125x + 84.375 = 180 Subtract 84.375 on both sides.
1.125x = 180 - 84.375
1.125x = 96.625 Divide by 1.125
x = 96.625 / 1.125
x = 85

They must sell 85 more boxes to raise 180 dollars.


4 0
3 years ago
Read 2 more answers
If Courtney walks 3 miles in 80 minutes, then Courtney will walk how far
ozzi
Divide 80/3 which equals 26.6. So it take Courtney 26.6 minutes to walk 1 mile. Then divide 110/26.6 which equals 4.1.

Courtney walls 4.1 miles in 110 minutes.
6 0
4 years ago
Other questions:
  • A= 16, c=34 b=? If c the hypotenuse of a right triangle find the missing side. If necessary round to the nearest hundredth
    11·2 answers
  • In the number 57.117 the 1
    7·1 answer
  • 1.You roll a fair six sided die twice.What is the probability of rolling a 3 and then a 5? A.1/3 B.1/6 C.1/12 D.1/36 2.What is t
    11·1 answer
  • Marat has $16 to buy doughnuts for Saturday morning breakfast. Specialty doughnuts cost $2 each and glazed doughnuts cost $1 eac
    13·2 answers
  • The measure of angle x= _ degrees
    15·2 answers
  • I need help dgdghdhddhdsjsjs​
    6·1 answer
  • (31-7) divided by 3(-4)
    11·1 answer
  • PLEASE HELP! ITS DUE IN 2 HOURS, I WILL GIVE BRAINLIEST. PLEASE SHOW ON GRAPH
    10·1 answer
  • The equation -7(u-3) = 70 is solved in several steps below.
    14·1 answer
  • If these two shapes are similar, what is the measure of the missing length n?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!