Skip to main content

Hello Worlddice throwing setup process for nbdev

Project description

nbdev-hello-world

This is a simple dice throwing class that uses NumPy default_rng to build an array of random integers depending upon the number of sides on the dice and the number of dice thrown.

Install

pip install nbdev-hello-dice

How to use

Here, we throw 1 die with 6 sides:

result = throw(6)
result
1 = sum([1])

Next, we can throw $\times 2$ dice and look at the sum

throw(6, 2)
3 = sum([1 2])

The dice values are stored in an array, as throw(N, inhand).dice as such

result = throw(6, 4)
result.dice
array([2, 1, 4, 6])

The sum of the dice values are saved in throw.(N, inhand).sum as such

result.sum
13

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

nbdev-hello-dice-0.0.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

nbdev_hello_dice-0.0.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file nbdev-hello-dice-0.0.2.tar.gz.

File metadata

  • Download URL: nbdev-hello-dice-0.0.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.15

File hashes

Hashes for nbdev-hello-dice-0.0.2.tar.gz
Algorithm Hash digest
SHA256 3a2943ce3ff0846abe5a95ae6411cb538314187b755cce185ca98dd31ec91fe8
MD5 168a3cde4339d53a232258ae1553f8ab
BLAKE2b-256 4a655eeed8d0f7d80feb06784a5adff1c7722ab0c4f151c4a6353f53157b3b0e

See more details on using hashes here.

File details

Details for the file nbdev_hello_dice-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: nbdev_hello_dice-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.15

File hashes

Hashes for nbdev_hello_dice-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 944b6bd026c0e551f4d58beb4823c1ab8f338a871111e53370fec002a5733c45
MD5 9caeeb38f23e4d59d46aea3f6fa4de61
BLAKE2b-256 6a550aebe2d523c1107f60d7c4c785f117558bb7debf9333b3be1733fda4d615

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