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
-

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…) -

TicTacToe Menace: The Learning Opponent
Welcome to TicTacToe Menace: The Learning Enemy! In this app, you play against a computer opponent based on the Menace Matchbox Calculator - an example of Reinforcement Learning.
The special feature: The learning table can be stored both locally and in a MySQL database, so that the opponent can learn from several players at the same time!
(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…)
