A command-line interface for simulating the Monty Hall problem.
Project description
montyhallsim
A command-line interface for simulating the Monty Hall problem.
Installation
PyPI
$ pip install montyhallsim
GitHub
$ git clone https://github.com/mrwolferinc/montyhallsim.git
$ cd montyhallsim
$ python setup.py install
Usage/Examples
The simplest usage of the interface:
$ montyhallsim
To run a simulation without swapping doors:
$ montyhallsim -n
To run a simulation with a specified number of rounds played:
$ montyhallsim -r 15
Arguments
Syntax: montyhallsim [-r [ROUNDS]] [-n]
Argument | Type | Description |
---|---|---|
-r [ROUNDS], --rounds [ROUNDS] | optional | Set the number of rounds to be played - defaults to 10. |
-n, --no-swap | optional | Run a simulation without swapping doors. |
Note: If you are running this package locally, then you will need to call
python -m montyhallsim
instead ofmontyhallsim
.
Running Tests
Tests are located inside the tests
directory and are run using pytest. To run tests, run the following commands:
$ pip install pytest
$ pip install -e .
$ pytest
Contributing
Contributions are always welcome!
See CONTRIBUTING.md for ways to get started.
Please adhere to this project's code of conduct while contributing.
License
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
Hashes for montyhallsim-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af03560a2b8b531a7b876af2a4415f42304c4312b84989a0f23a4288b629e158 |
|
MD5 | 8e5c59a80db780663fe09af4bac85e84 |
|
BLAKE2b-256 | a3bc47c65e65a3df47f00676e3cae324079fbc510d7b93311c014088cbb87665 |