#!/usr/bin/env python # # a simple program using the Point class # # written by e.bonakdarian dec 2010 # from Point import Point def main(): tom_start = Point(200, 300) tom_end = Point(500, 700) mary_start = Point(234, -300) mary_end = Point(200, 0) tom_distance = tom_start.p_distance(tom_end) mary_distance = mary_start.p_distance(mary_end) print 'Tom traveled %.2f units.' % tom_distance print 'Mary traveled %.2f units.' % mary_distance if tom_distance > mary_distance: print 'Tom traveled further.' elif mary_distance > tom_distance: print 'Mary traveled further.' else: print 'Both traveled the same distance.' if __name__ == '__main__': main()