Make a class for straight lines. Make a class Line whose constructor takes two points p1 and p2 (2- tuples or 2-lists) as input. The line goes through these two points (see function line in Chapter...


Make a class for straight lines. Make a class Line whose constructor takes two points p1 and p2 (2- tuples or 2-lists) as input. The line goes through these two points (see function line in Chapter 3.1.7 for the relevant formula of the line). A value(x) method computes a value on the line at the point x. Here is a demo in an interactive session:

Nov 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here