michalspano / pascals-triangle

Composing Pascal's Triangles from the command line.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pascal's Triangle with Graphical Representation

Dependencies

To install the required dependencies, run the following command:

$ pip install -r requirements.txt

Usage

To run the program, use the following command:

$ ./main.py [-g|--graph] [-d|--debug] [-r|--read]

By default, the program generates a graphical representation of Pascal's triangle and saves it as a PNG image in the ./out/Graph.gv.png directory.

Options

  • -g, --graph: Generates a pictorial representation of Pascal's triangle. The output is saved as a PNG image.
  • -d, --debug: Displays the schema of the graph and the elapsed time.
  • -r, --read: Reads Pascal's triangle data from a local .gv file.

Example

Below is an example of a pictorial representation of Pascal's triangle with PNG support.

Example Output

About

Composing Pascal's Triangles from the command line.


Languages

Language:Python 100.0%