Department of Mathematics

Math 583: Mathematical Hacking

ICE 4

Write a Python class called "line" that describes a line. The constructor should take four arguments: the x and y coordinates of two points. It should compute a slope and intercept and maintain attributes for those. It should do something intelligent if the line is vertical. It should contain one method that returns the slope and intercept for the line.

Mail the completed .py file to the instructor .

Welcome to Math 583, Hacking Mathematics.





Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 2009-15 Kevin Cooper