Mathematics and programming course design

The "Mathematics and Programming Course Design" is primarily aimed at eighth-grade students. It assists them in understanding the general process of using Python programming to solve mathematical problems, learning about variable definitions, basic data structures, the three main programming structures, and the use of functions. The course introduces students to the Python Tutor visualization tool, which helps them intuitively understand the process of program running. When I practiced this course in a Shenzhen-based middle school, the most favored lesson among students was using the Python-Turtle library to solve spatial problems.


Visualization tool for code explanation

Introducing Python Tutor to visualize code

Python Tutor can visualize the execution process of code, helping students see the state changes after each line of the program runs, including the addition and modification of variables, further deepening programming thinking.


Favored lesson among students

Using Python-Turtle to solve spatial problems

Based on the scenario of building geometric bodies starting from two views in the math textbook, I draw and render graphics based on the python-turtle library. By assisting students in problem definition, control structure design, implementation of each part of the structure, debugging, and verification, I convey to them the skills of logical combing and decomposing complex problems. This lesson helps students consolidate programming knowledge and enhance their spatial imagination ability at the same time.