Page 1 of 1

Can't import any modules. **Python code only

Posted: Mon Jun 06, 2022 6:16 pm
by answerhappygod
Can't import any modules. **Python code only
Can T Import Any Modules Python Code Only 1
Can T Import Any Modules Python Code Only 1 (55.39 KiB) Viewed 25 times
3. The Manhattan distance between two points (x1, x2) and (y1, y2) - the distance a car needs to travel between two points in a city on a grid - is (in 2 dimensions): manhat = |(y₁ -x₁)| + |(Y₂ −X₂)| Write a definition for manhat (x, y), where x and y are points in N- dimensional space, each represented as a list of floating point values, e.g. manhat ([1, 3, 5, 7], [1, 9, 25, 42]) returns 61. You can assume that the lists are the same length, though not necessarily length 4. (..] stands for the absolute value function.) [10 Marks]