Skip to main content

Check if 2 lines overlap

Project description

Ormuco Code Challenge

This project has been created only for demonstration purpose.

The challenge

Your goal for this question is to write a program that accepts two lines (x1,x2) and (x3,x4) on the x-axis and returns whether they overlap. As an example, (1,5) and (2,6) overlaps but not (1,5) and (6,8).

The Answer

source directory: ./overlap


  • Run pip3 install cf_lines_overlap
from overlap.overlap import overlap

result = overlap((1,5), (4,25))

# It will return True if the lines overlap, False otherwise

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for cf-lines-overlap, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size cf_lines_overlap-0.0.2.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page