Skip to content

1. Introduction

The PDF for this document is available |HERE|.

You can download the code and files for this tutorial HERE.

Here, we revisit a problem presented in 2020 in the course [Introduction to the Python Language and the Flask Web Framework Through Examples (2020)]. That course was based on a simplified tax calculation for the year 2019. A Python script was developed to solve the problem and then adapted into multiple versions (18) until the tax calculation was implemented in a web application MVC.

The aim here is to demonstrate that the initial tax calculation script can now be generated using IA (Artificial Intelligence) tools. We used seven tools: ChatGPT, Grok, Gemini, MistralAI, DeepSeek, ClaudeAI, and Perplexity. There are others.

This document does not necessarily require knowledge of the Python language. The seven tools must generate a Python script containing 11 unit tests at the beginning, and 25 tests in total. Simply load this code into a Python development environment, run it, and verify that the tests pass. The generated code can then be considered “likely correct.” Python users will be more interested in the code itself. They will find that the generated Python scripts are generally very well written.

Furthermore, this document shows that the IA tools used are fairly easy to use and that the interaction between the user (you) and the IA tool is no different from that between a teacher and a student.

This document was written in September 2025. The IA is evolving rapidly, and it is possible that the following screenshots will quickly become obsolete. If you ask the same questions as in this document, it is very likely that you will get different answers than those provided here. Simply follow the process for refining your instructions, shown here, to assist the IA.