No project description provided
Project description
checkout-time-computer
checkout-time-computer simulates a grocery store checkout line to determine the total time required for all customers to check out.
Installation
Package is published on PyPI, you can install it using pip:
pip install checkout-time-computer
Usage
from checkout_time_computer import CheckoutTimeComputer
# Example usage
checkout_computer = CheckoutTimeComputer([5, 3, 4], 1)
print(checkout_computer.compute_checkout_time()) # Output: 12
checkout_computer = CheckoutTimeComputer([10, 2, 3, 3], 2)
print(checkout_computer.compute_checkout_time()) # Output: 10
checkout_computer = CheckoutTimeComputer([2, 3, 10], 2)
print(checkout_computer.compute_checkout_time()) # Output: 12
Local development
Project is set up using Poetry, to run it locally follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/augustinasn/checkout-time-computer.git
-
Navigate to the project directory:
cd checkout-time-computer
-
Install Poetry (if you haven't already):
pip install poetry
-
Use Poetry to install the project's dependencies:
poetry install
-
Activate the Poetry virtual environment:
poetry shell
-
Tests are included in the tests directory. You can run the tests using the following command:
python test.py
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
File details
Details for the file checkout_time_computer-1.0.0.tar.gz
.
File metadata
- Download URL: checkout_time_computer-1.0.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48d229c7faaf07c958bdb3b54b268e837a48cc455fa734b558b7c90ed22fbf55 |
|
MD5 | 0eda5c2da71f1bfa58404f920fb3e730 |
|
BLAKE2b-256 | 04bc0488a0eb128211a80fa160758a22dfcedfeebcda648e1bd00ca8bd5d9319 |
File details
Details for the file checkout_time_computer-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: checkout_time_computer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5921af15f536fbc0a22d0f1a1bc61e9d03ee35edc1ffee6357b9103c224562de |
|
MD5 | fa8ca49629d84d771fe2bb01c578d826 |
|
BLAKE2b-256 | 9bb5f7686a4fc618a81dfa2d9ffe14b398ad88e0afcd34ef5c10656e68225cef |