Skip to content

Instantly share code, notes, and snippets.

@popey456963
Created November 5, 2015 18:08
Show Gist options
  • Save popey456963/f203215eeef12d5eab0c to your computer and use it in GitHub Desktop.
Save popey456963/f203215eeef12d5eab0c to your computer and use it in GitHub Desktop.
Midpoint Finder
x_1, y_1 = [int(i) for i in input().split()]
x_2, y_2 = [int(i) for i in input().split()]
x = (x_1+x_2)/2
y = (y_1+y_2)/2
if str(x)[-2:]==".0":
x = int(x)
if str(y)[-2:]==".0":
y = int(y)
print(x, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment