In this article, the Hamming code is first built with seven coins and without a computer and tested practically. You will learn how test bits can detect errors in a transferred bit sequence and determine the faulty position. The procedure is then programmed in a Jupyter notebook with Python.
(more…).python
Entdecke spannende Python-Projekte in der Kategorie „.python“! Von einfachen Skripten bis hin zu komplexen Anwendungen – finde Inspiration, wie du deine eigenen Programme entwickelst.
-

Compressing Data with Smart (Part 2) – Converting Huffman Code in Python
In the first part, the example of KAFFEPAUSE was shown how the Huffman algorithm uses character frequency to create a binary tree and extract space-saving, unique codes from it. The basics are explained in detail in Teil 1 on ffritze.de.
In this second part, the Huffman algorithm is implemented in Python and gradually traced in a Jupyter Notebook. The focus is not only on the finished program. The individual data structures and processing steps are made visible so that the construction of the Huffman tree and the generation of the codes can be tried out directly.
(more…) -

Abstract data types in school: Python implementations for download
In Lower Saxony, various abstract data types such as stack, queue, dynamic array and binary tree are treated in the school. The interfaces to this are explained in a handout (vgl. PDF-Datei).
(more…)
