Find the intersection of two lines: Difference between revisions

m
(→‎{{header|Python}}: Describe approaches (proced/func) and mark library w header)
Line 1,380:
{{Out}}
<pre>(5.0, 5.0)</pre>
 
Or, labelling the moving parts a little more, and returning a composable option value containing either a message (in the absence of an intersection), or a pair of coordinates:
 
{{Works with|Python|3.7}}
Find the intersection using a functional approach, by importing [https://docs.python.org/3/library/functools.html functools.reduce]
<lang python>'''The intersection of two lines.'''
9,655

edits