The water jug riddle with Jupyter Notebook
Project description
Water Jug Riddle
The player has two ungraduated jugs with two different capacities. For instance, the first one has a 5 liters capacity and the second one a 7 liters capacity. The player has 3 possible actions on each jug:
- Fill the jug to its maximum capacity
- Empty the jug
- Pour the water of one jug into the other one
The main goal is to obtain all volumes from 0L to 7L. In this version of the game, the player is allowed to try every combination of capacities from 0L to 10L. To execute an action, the player can either :
- Click on the buttons below the picture
- Call the class'methods
Link to the demonstration :
- Demo.ipynb
- Binder :
Dependencies:
- notebook
- ipywidgets
- ipycanvas
- traitlets
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
ipywidgets_game_jugs-0.0.1.tar.gz
(208.0 kB
view details)
Built Distribution
File details
Details for the file ipywidgets_game_jugs-0.0.1.tar.gz
.
File metadata
- Download URL: ipywidgets_game_jugs-0.0.1.tar.gz
- Upload date:
- Size: 208.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bbe26abd1aec8d01a9066ef3780106a0ad097dda881549137974addf26217a4 |
|
MD5 | 4bb075a77f1a8a923a60291d825b971b |
|
BLAKE2b-256 | 828aad0e88ce09090c60c93cd5bce93d0cd7fa2a18a8afa5632b168f4d646211 |
File details
Details for the file ipywidgets_game_jugs-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: ipywidgets_game_jugs-0.0.1-py3-none-any.whl
- Upload date:
- Size: 209.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53f80f4bab30f78f7416a0b4dc2ac536c34aae706c87e44aff3bb6e8f71963f3 |
|
MD5 | db019dd618f5e2f60d39462d16769750 |
|
BLAKE2b-256 | 9194c0457542d985b113b92c8f83a6da96cbb8165edd6f107a6b5a7bebeb3f55 |