Skip Navigation

Python|Annie UK


Saturday 27 July 2024



Introduction

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation.


ANSI Mastermind

Below is the souce code for my mastermind game written in Python3. I'm learning Python in my spare time and this was a good starting point. The game has built-in instructions so should not be too difficult to get to grips with.

This game uses ANSI colour codes so you need to launch it in a terminal that supports ANSI codes, You can launch the game in a terminal window on Linux: ctrl+Alt+T, Windows: Win+X choose "windows terminal", Mac OS: cmd+space type "terminal", etc… using one of the commands below:


python mastermind.py or python3 mastermind.py


Make sure you have previously navigated to the folder/directory where you have extracted the mastermind.py python script


Download Version 1.12
mastermind.zip 5.677Kb or mastermind.7z 5.246Kb

Force Graphic Theme (may give unpredictable page rendering)