Skip to main content

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 :

Dependencies:

  • notebook
  • ipywidgets
  • ipycanvas
  • traitlets

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

ipywidgets_game_jugs-0.0.2.tar.gz (208.1 kB view details)

Uploaded Source

Built Distribution

ipywidgets_game_jugs-0.0.2-py3-none-any.whl (209.8 kB view details)

Uploaded Python 3

File details

Details for the file ipywidgets_game_jugs-0.0.2.tar.gz.

File metadata

  • Download URL: ipywidgets_game_jugs-0.0.2.tar.gz
  • Upload date:
  • Size: 208.1 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

Hashes for ipywidgets_game_jugs-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6bc834199dac5bf62cedd9b4678cebb263d8166a60f6e5ab7c74edd3b2ccf146
MD5 6c35b904d8ce2f50002d4ebb7b36dd62
BLAKE2b-256 d3c9ebb334a81eb203876cb3506b3e05c657fdabf225274e75db4cac59dd74b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ipywidgets_game_jugs-0.0.2-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

Hashes for ipywidgets_game_jugs-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0ef1d333dc2ef62ad528b00a0532da8fb2ddd7339ac1dacc3fe72452af6cd37
MD5 59415b60a2580cfce42029d7bbc408be
BLAKE2b-256 9d7cc43fa9f92e02cef3d1b414e531e9d85a9127b9764d286de3caba14e4567a

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