Skip to main content

To return a lsit of randomly drawn numbers from a user defined list of numbers.

Reason this release was yanked:

code not behaving as expected

Project description

perform_draw

A simple app that will randomly draw a given set up numbers from a list.

Installation

Run the following to install:

pip install perform_draw

Usage

python3 perform_draw.py

Please enter the total number of balls to be placed in the bag: You must enter a whole number (integer) greater than 0 15

Please enter the total number of balls to be drawn: You must enter a whole number (integer) greater than 0 and less than 15. 5

Numbers drawn are: [12, 9, 1, 8, 4]

When the object is called, you pass the following variables:

number: The number of items in the pool to be picked from. example: number = 5 will create a pool [1, 2, 3, 4, 5]

pick: The number of items to be randomly drawn from the pool. example: pick = 2 will return a list of the randomly drawn items, say [4, 2]

put_back: Whether an item is put back into the pool prior to the next draw. Input as a boolean True or False, with a default of False.

Install Requires

This package uses the following standard library packages:

  1. math
  2. random

In Closing

This package has been built as part of my learning Python so may contain coding that is not best practice. I am happy for more experienced Python users to feedback any areas that could be improved. Once I get to understand uploading packages to PyPI I will set up development dependencies.

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

perform_draw-0.0.1.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

perform_draw-0.0.1-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

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