Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reuf/dadf180c5ae30362d588c6b1e9631ecc to your computer and use it in GitHub Desktop.
Save reuf/dadf180c5ae30362d588c6b1e9631ecc to your computer and use it in GitHub Desktop.
# https://www.w3resource.com/python-exercises/python-basic-exercise-73.php
import math
x1, y1 = float(input("x1 = ")), float(input("y1 = "))
x2, y2 = float(input("x2 = ")), float(input("y2 = "))
p1 = [x1, y1]
p2 = [x2, y2]
mid = [(x1+x2)/2, (y1+y2)/2]
print(mid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment