For this assignment these were the instructions:
Write a function that receives four parameters: x1, y1, x2, y2 which are all floating point values.
The function is called distance and returns (float) the distance between x1,y1 and x2,y2 on the cartesian coordinate plane.
Here is the code written on Atom:
Here is the code running on Terminal, once again I’ve decided to run it twice and using different values just to test the results and have a better understanding.
Advertisements