Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def midpoint(input):
- cor0 = input.split("|")[0].split(",")
- cor1 = input.split("|")[1].split(",")
- return ((float(cor0[0])+int(cor1[0]))/2), ((float(cor0[1])+int(cor1[1]))/2)
- sum = 0
- for x in open("plane22.txt", "r"):
- sum += midpoint(x)[1]
- print sum
Advertisement
Add Comment
Please, Sign In to add comment