Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs190c:problemset3_09 [2009/01/29 22:32]
seh
cs190c:problemset3_09 [2009/01/31 08:14]
seh
Line 81: Line 81:
  
 These functions are in file {{cs190c:​ps3_09_p2_lib.py|}}. ​ You can use them without making any changes or you can change them.  In either case, you need to submit this file - without changing its name - along with file problem2.py. These functions are in file {{cs190c:​ps3_09_p2_lib.py|}}. ​ You can use them without making any changes or you can change them.  In either case, you need to submit this file - without changing its name - along with file problem2.py.
 +
 +
  
  
Line 141: Line 143:
     ​     ​
     # Print the distance between two points     # Print the distance between two points
-    print "The distance between ​and is:", distance(pointA,​ pointB)+    print "The distance between", pointA, "and", pointB,"​is:", distance(pointA,​ pointB)
  
     # Find the point in myPoints closest to point B     # Find the point in myPoints closest to point B
     closeToB = closest(myPoints,​ pointB);     closeToB = closest(myPoints,​ pointB);
-    print "The point closes to is:", closeToB+    print "The point closes to", pointB, "is:", closeToB
  
     # Find the nearest neighbors in myPoints     # Find the nearest neighbors in myPoints
 
cs190c/problemset3_09.txt ยท Last modified: 2009/01/31 08:14 by seh
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki