ispm()determines if this time is post meridiem or after midday (after 'clock nooncomparable othertime )compares this time to the othertime to determine their logical ordering this comparison can be done using any of the python logical operators tostring ()returns string representing the time in the -hour format hh:mm:ss invoked by calling python' str(constructor design and implement timedate adt that can be used to represent both date and time as single entity line segment is straight line bounded by two endpoints the line segment adtwhose operations are described belowrepresents line segment defined by points in the two-dimensional cartesian coordinate system use the point class from appendix and implement the line segment adt linesegmentptaptb )creates new line segment instance defined by the two point objects endpointa()returns the first endpoint of the line endpointb()returns the second endpoint of the line length ()returns the length of the line segment given as the euclidean distance between the two endpoints tostring ()returns string representation of the line segment in the format (axay)#(bxbyisvertical()is the line segment parallel to the -axisishorizontal()is the line segment parallel to the -axisisparallelotherline )is this line segment parallel to the otherlineisperpendicularotherline )is this line segment perpendicular to the otherlineintersects(otherline )does this line segment intersect the otherlinebisectsotherline )does this line segment bisect the otherlineslope()returns the slope of the line segment given as the rise over the run if the line segment is verticalnone is returned shiftxincyinc )shifts the line segment by xinc amount along the -axis and yinc amount along the -axis midpoint()returns the midpoint of the line segment as point object polygon is closed geometric shape consisting of three or more line segments that are connected end to end the endpoints of the line segments are known as verticeswhich can be defined by points in the two-dimensional cartesian coordinate system