This repository is a programming course for beginners. It is particularily suitable for people knowing and enjoying nonograms, including kids. It uses Python 3.8+ to build a simple nonogram solver in 10 basic lectures. Five further lectures show more features to encourage own experiments and improvements.
The material contains just the code and needs an experienced teacher to explain all the material and techniques. As a brief guide we provide just a very few words to each lecture here:
Hello world an a few math operations with variables and f-strings.
for
loop on ranges and lists.
Some more basic features of lists. Conditions. while
loop.
Conditions with and
and or
. Loop in loops.
Functions. Generating a nonogram line of a list of booleans.
Recursion.
Putting together lecture 5 and 6 to generate parts of a line for a nonogram. Introducing None
.
Improve a line.
Introduce a grid, rows and columns.
Solve a nonogram.
Names tuples as compound datastructures. Reading and writing files. Exceptions.
Major speed improvement.
Dictionaries. Generate the smallest "unsolveable" nonogram.
Use pyx
to generate PDFs of a nonogram or solution.
Use pgzero
to visualize it all on the screen.