functions - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: functions (/thread-27524.html) |
functions - Rudson67 - Jun-09-2020 Hi, I have a big problem with this task. Can someone help me? Thank you in advance! :) Modify the program from point 1 so that the function instead of four numbers gets two lists containing the coordinates of the points. (Point 1 below). It's mainly about operations on lists and counting the length of the section with their help. Write a program that will: contain a function called with four parameters (x1, y1, x2, y2) being coordinates (x, y) of two points on the plane. This function is to return a number equal to the length of the segment formed from these points. RE: functions - Yoriz - Jun-09-2020 Hi welcome to the forum. Please read Homework and No Effort Questions RE: functions - jefsummers - Jun-09-2020 So they want you to create a function like def dist(x1, y1, x2, y2):And modify it to def dist(p1, p2):Show us your code for the first function and we can help with the second |