Numberwang.py

A utility to recreate the classic gameshow, Numberwang!

What’s Numberwang..? See this YouTube video from the first episode.

Installation

To install simply type:

$ pip install numberwang

Usage

Simply pass a sentence to the numberwang command. The sentence must contain a number:

$ numberwang The square root of -1
That's Numberwang!

If you don’t a response, it’s because the sentence isn’t Numberwang. In that case, please try again.

Development

The source code is hosted in GitHub. Please feel free to fork the repository. Assuming you have Git installed you can download the code from the canonical repository with the following command:

$ git clone https://github.com/ntoll/numberwang.git

Ensure you have the correct dependencies for development installed by creating a virtualenv and running:

$ pip install -r requirements.txt

There is a Makefile that helps with most of the common workflows associated with development. Typing make on its own will list the options.

API

A recreation of Numberwang, but in Python.

numberwang.is_that_numberwang(sentence)[source]

Given a sentence, will return a boolean indication if the sentence is numberwang.

A valid sentence must contain a number.

If the sentence is invalid, a ValueError exception is generated.

numberwang.main()[source]

Reads input from arguments passed into the script and prints the output (should there be any) to stdout.

Release History

0.0.1

  • Initial release for educational purposes.
  • 100% test coverage.
  • Minimal documentation.

License

Copyright (c) 2018 Nicholas H.Tollervey.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.