Skip to main content

A n ** 2-by-n ** 2 sudoku solver.

Project description

sudsoln

Build Status codecov

A n ** 2-by-n ** 2 sudoku solver.

Installation

To install, type:

pip install sudsoln

To update, type:

pip install sudsoln --upgrade

A very brief introduction to sudsoln

import sudsoln as ss
eg = '6.5..7..1.1..2..5......6..33.2.......4.....8.......9.52..9......6..1..2.5..3..7.6'
eg = ss.to_sudoku(eg)
eg
#> Sudoku(
#>     6    .    5    |    .    .    7    |    .    .    1
#>     .    1    .    |    .    2    .    |    .    5    .
#>     .    .    .    |    .    .    6    |    .    .    3
#> -------------------+-------------------+-------------------
#>     3    .    2    |    .    .    .    |    .    .    .
#>     .    4    .    |    .    .    .    |    .    8    .
#>     .    .    .    |    .    .    .    |    9    .    5
#> -------------------+-------------------+-------------------
#>     2    .    .    |    9    .    .    |    .    .    .
#>     .    6    .    |    .    1    .    |    .    2    .
#>     5    .    .    |    3    .    .    |    7    .    6
#> n: 3
#> elements: 1, 2, 3, 4, 5, 6, 7, 8, 9
#> empty: .
#> )
eg.solve()
#> ('0:00:00.086731', 0)
eg
#> Sudoku(
#>     6    3    5    |    8    9    7    |    2    4    1
#>     8    1    9    |    4    2    3    |    6    5    7
#>     7    2    4    |    1    5    6    |    8    9    3
#> -------------------+-------------------+-------------------
#>     3    5    2    |    6    8    9    |    1    7    4
#>     9    4    6    |    5    7    1    |    3    8    2
#>     1    8    7    |    2    3    4    |    9    6    5
#> -------------------+-------------------+-------------------
#>     2    7    1    |    9    6    5    |    4    3    8
#>     4    6    3    |    7    1    8    |    5    2    9
#>     5    9    8    |    3    4    2    |    7    1    6
#> n: 3
#> elements: 1, 2, 3, 4, 5, 6, 7, 8, 9
#> empty: .
#> )
eg.is_valid_answer()
#> True

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

sudsoln-0.1.0.tar.gz (35.7 kB view details)

Uploaded Source

File details

Details for the file sudsoln-0.1.0.tar.gz.

File metadata

  • Download URL: sudsoln-0.1.0.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.2

File hashes

Hashes for sudsoln-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a98e6824b1bdbcc3cfe858d7f864ed9f7d4f88d483718cdb0487b0f4888f026
MD5 06277f6ac27c2f3375ead1299831de86
BLAKE2b-256 10579f14f7c280abf19b338dfabb34c27d886cb59b0847503694ca38feebd408

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