Skip to main content

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:

  1. Clone this repository to your local machine:

    git clone https://github.com/augustinasn/checkout-time-computer.git
    
  2. Navigate to the project directory:

    cd checkout-time-computer
    
  3. Install Poetry (if you haven't already):

    pip install poetry
    
  4. Use Poetry to install the project's dependencies:

    poetry install
    
  5. Activate the Poetry virtual environment:

    poetry shell
    
  6. 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


Download files

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

Source Distribution

checkout_time_computer-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

checkout_time_computer-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file checkout_time_computer-1.0.0.tar.gz.

File metadata

File hashes

Hashes for checkout_time_computer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 48d229c7faaf07c958bdb3b54b268e837a48cc455fa734b558b7c90ed22fbf55
MD5 0eda5c2da71f1bfa58404f920fb3e730
BLAKE2b-256 04bc0488a0eb128211a80fa160758a22dfcedfeebcda648e1bd00ca8bd5d9319

See more details on using hashes here.

File details

Details for the file checkout_time_computer-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for checkout_time_computer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5921af15f536fbc0a22d0f1a1bc61e9d03ee35edc1ffee6357b9103c224562de
MD5 fa8ca49629d84d771fe2bb01c578d826
BLAKE2b-256 9bb5f7686a4fc618a81dfa2d9ffe14b398ad88e0afcd34ef5c10656e68225cef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page