Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
functions
#1
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.
Reply
#2
Hi welcome to the forum.
Please read Homework and No Effort Questions
Reply
#3
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
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020