Compare version strings
Project description
## Ormuco Code Challenge
This project has been created only for demonstration purpose.
>
> ### The challenge
>
> The goal of this question is to write a software library that accepts 2 version string as input and returns whether one is greater than, equal, or less than the other. As an example: “1.2” is greater than “1.1”. Please provide all test cases you could think of.
>
### The Answer
source directory: `./compare_versions`
usage:
```
from compare_versions import compare_versions
result = compare_versions('1.0.0.2.9', '1.0.0.3.4')
# It will return:
# A positive number: If the first version is greater than the second
# A negative number: If the first version is smaller than the second
# Zero: If the versions are equals
```
This project has been created only for demonstration purpose.
>
> ### The challenge
>
> The goal of this question is to write a software library that accepts 2 version string as input and returns whether one is greater than, equal, or less than the other. As an example: “1.2” is greater than “1.1”. Please provide all test cases you could think of.
>
### The Answer
source directory: `./compare_versions`
usage:
```
from compare_versions import compare_versions
result = compare_versions('1.0.0.2.9', '1.0.0.3.4')
# It will return:
# A positive number: If the first version is greater than the second
# A negative number: If the first version is smaller than the second
# Zero: If the versions are equals
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cf_compare_versions-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 567c3deaf35ca08afc4265bbadbd407b217ada0d63ec698eb2009c6a2cff73c9 |
|
MD5 | 829137b4d873adaf27b5d6bb2ed651b1 |
|
BLAKE2b-256 | ae1b725d07b2e178752090425f8ca2e51e92c1c48e6a4f5622d106f4651a7a0e |
Close
Hashes for cf_compare_versions-0.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf16ef18a3b2a8653796d79f194dd8c08205c5cba46c772428485eba6ca761ff |
|
MD5 | 1afd9bf82bd84908a2a7168003b741d4 |
|
BLAKE2b-256 | c01aa6e419820715198c66e6fd4d1fd27af2c2aa3a181549514f3282cb67740e |