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
iPhone 8 has a screen with an aspect ratio of 16:9, a diagonal length of 5.5, and 1080 by 1920 physical pixels. compute the dime
bixtya [17]

Answer:

iPhone 8+ (2017) 736 × 414 1920 × 1080 16:9 3× 5.5″ 401 PPI

Step-by-step explanation:

8 0
3 years ago
Can someone help me with this problem?
Veseljchak [2.6K]

Answer:

yes

Step-by-step explanation:

4:8 and 3:6 when simplified gives the same result which is 1:2

7 0
2 years ago
Read 2 more answers
What’s the equation for -2(3x-4)+9=2x+3
Scorpion4ik [409]
-6+8+9=2x+3
11=2x+3
8=2x
x=4
8 0
4 years ago
Read 2 more answers
How do you rewrite an equation in exponential form ?
valentina_108 [34]

Answer:4=log(x)

For logarithmic equations,  logᵇ(x)=y  is equivalent to  b∧y=x  such that  x>0,b>0, and  b≠1.

In this case,  b=10,  x=x, and  y=4.



6 0
3 years ago
Quick and easy geometry thanks please help !!!!!
netineya [11]

Answer:

Midpoint of segment AB= (-0.5, 0)

Step-by-step explanation:

The midpoint coordinates of the midpoint has the x coordinate on .5 and the y coordinate on 0.

5 0
4 years ago
Other questions:
  • Which is a factor of 54xy + 45x + 18y + 15?
    9·1 answer
  • Which level of government relies the most on income tax
    5·2 answers
  • Londynnorth londynnorth Middle School Mathematics 5+3 pts NEED HELP ASAP BRAINLEIST Solve and graph the absolute value inequalit
    12·2 answers
  • What is 21/27 in simplest form?
    9·1 answer
  • <img src="https://tex.z-dn.net/?f=%20%7Bx%7D%5E%7B2%7D%20%3D%20%20%5Cfrac%7B121%7D%7B196%7D%20" id="TexFormula1" title=" {x}^{2}
    6·1 answer
  • Can someone help me with this problem. I don’t know how to do volume.
    15·1 answer
  • Apples are on sale at four different grocery stores. Which store offers the
    10·1 answer
  • If you roll a fair 6 sided die and then flip a fair coin, what is the probability that you roll a 1, 2, 3, or 4 and get heads wi
    10·2 answers
  • Write the equation of the mine in fully simplified slope intercept form
    8·2 answers
  • Please help due at 10:00!!!!!!!!!
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!