Sudoku Solver
Solves Sudoku within seconds. The Sudoku can be given manually in the output screen or from a file.
This package also contains other functions on lists, that are useful to solve a Sudoku.
Sudoku Format
Blank cells should be given as '-' and the number of characters should be 9. Press Enter after giving 9 characters, to enter the next row in Sudoku. If 9 characters are not given or the given characters are not unique, a warning will be given to re-enter the row.
Overall, the format of the Sudoku should be as follows:
15-8--7-2
-3--5----
--72--5--
-----1-9-
-2--89---
9-----18-
36---2--4
--4-6-9--
-9-----61
Functions
Main function:
- solveSudoku - Used to solve the Sudoku.
Other useful functions:
- get_sudoku - Imports Sudoku from a text file.
- prompt_sudoku - Prompts the Sudoku.
- blocks_has_duplicates - Checks if the Sudoku blocks have duplicates or not.
- blockify - Converts 9x9 Sudoku list into a list containing lists of values in the block of the given Sudoku.
- vertically_has_duplicates - Checks whether the given collection of lists have duplicate values at the same indexes or not.
- list_difference - Difference between two lists.
- list_intersection - Intersection between two lists.
- combo_recursion - Recursion function used to calculate all the combinations of a list.
- all_combinations - Uses the 'combo_recursion' function inside a loop, that iterates through the given list.
- block_number - Gives the block number in which the given row and column numbers intersects in a Sudoku.
- value_inserts - Inserts the given list of possible missing values inside the given original list, at the positions where the values are missing inside the original list.
- insert_combos - Tries all combinations of missing elements and inserts to a list and returns it.
- vertical - Transpose of a nx9 list.
- list_duplicates_of - Predicts the indexes of duplicate elements inside a list.
Refer the Documentation for more info.
Source Code and Documentation
Metadata
Release files for solvesudoku 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solvesudoku-0.0.3.tar.gz | 18.2 kB | Without provenance | Details for solvesudoku-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solvesudoku-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for solvesudoku-0.0.3-py3-none-any.whl |
Total release size: 36.3 kB
Release files / solvesudoku-0.0.3.tar.gz
| Download URL | solvesudoku-0.0.3.tar.gz |
|---|---|
| Size | 18.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa994b699e74c730357e18152a7a8af891c397350393bf98688a78a479dd215e
|
|
BLAKE2b-256 checksum How to use checksums |
94986cca72b195c521dd789164ce8f854d76012907188245307c482ce576b215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|
Release files / solvesudoku-0.0.3-py3-none-any.whl
| Download URL | solvesudoku-0.0.3-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25194e5c70708cb8954cc8fff5296e8ab66d058a2f1b0ee717c17a6196cf2b96
|
|
BLAKE2b-256 checksum How to use checksums |
3bfd6f76cabb29bf0a0b418bfd11b0a44b0129685da99693177241131b32e5c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0
|
Security for solvesudoku 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.