Question: Please write a python program Problem 3 Same idea as Problem 2, but now we'll use Manhattan distance as our distance measure. Given two points

Please write a python program
Problem 3 Same idea as Problem 2, but now we'll use Manhattan distance as our distance measure. Given two points (x1, y1), (x2,y2), Manhattan distance is defined as: manhattan = |x2 x;l + ly2 yil The || signs represent absolute value. Python has a built-in abs function that comes in handy (example: a = abs(-5)). Calculate three things, and print them all out: Manhattan distance between my house and Starbucks, Manhattan distance between my house and Dunkin' Donuts, and The smaller (minimum) of the two distances. (You can use the same min function as last week for the bikes.) . For full credit under the documentation category, figure out and comment with the expected Manhattan distances. Do this before you start coding -- that way you know if your program works! # Test cases # House to Starbucks (Manhattan): # House to Dunkin' (Manhattan): Problem 4 Use matplotlib to plot all three locations (my house, Starbucks, and Dunks) on an x/y plane, using the colors from the files as the colors of the markers. Label your markers; your plot should look something like this: 100 home starbucks dunkin' 90 80 70 60 50 60 70 80 90 100 Problem 3 Same idea as Problem 2, but now we'll use Manhattan distance as our distance measure. Given two points (x1, y1), (x2,y2), Manhattan distance is defined as: manhattan = |x2 x;l + ly2 yil The || signs represent absolute value. Python has a built-in abs function that comes in handy (example: a = abs(-5)). Calculate three things, and print them all out: Manhattan distance between my house and Starbucks, Manhattan distance between my house and Dunkin' Donuts, and The smaller (minimum) of the two distances. (You can use the same min function as last week for the bikes.) . For full credit under the documentation category, figure out and comment with the expected Manhattan distances. Do this before you start coding -- that way you know if your program works! # Test cases # House to Starbucks (Manhattan): # House to Dunkin' (Manhattan): Problem 4 Use matplotlib to plot all three locations (my house, Starbucks, and Dunks) on an x/y plane, using the colors from the files as the colors of the markers. Label your markers; your plot should look something like this: 100 home starbucks dunkin' 90 80 70 60 50 60 70 80 90 100
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
