Artificial Intelligence Empowered Teaching Reform and Exploration of Python Programming Course ()
1. Introduction
In recent years, content-generative artificial intelligence has been rapidly developing. A range of AI applications, exemplified by ChatGPT, based on powerful deep learning algorithms and extensive data training [1], has demonstrated outstanding performance in natural language processing, code generation, and other areas. These applications can rapidly generate code frameworks for complex algorithms, explain programming concepts in detail, and provide accurate answers to various technical questions.
In the field of education, AI’s influence is profound. On the one hand, it significantly expands the library of teaching materials by offering diverse case studies and real-time knowledge updates. On the other hand, it transforms the way students learn, allowing them to overcome the constraints of time and space and engage in autonomous exploration with the support of AI tools [2]. However, AI also presents challenges, such as students’ over-reliance on technologies and difficulties in evaluating the accuracy and reliability of AI-generated content. In this context, investigating the effective application of AI in Python programming education is of great practical significance. This study takes Nanfang College Guangzhou as a case study for a more in-depth exploration.
Suppose the degree of students’ knowledge mastery is
, the learning time is
, and the learning efficiency is
. Under the traditional teaching mode,
. After the introduction of artificial intelligence, let the learning efficiency improvement coefficient be
, then
. This formula initially indicates the potential improvement of AI on knowledge acquisition efficiency, but in fact, a variety of factors need to be comprehensively considered. For example, we can further modify the formula as
(where
represents the negative impact caused by students’ over-reliance on AI, and
is the corresponding weight coefficient), which can more comprehensively reflect the actual situation of students’ learning under the influence of AI.
2. Background of Teaching Reform
The Python programming course at Nanfang College Guangzhou, originally followed a traditional teaching approach. In this method, teachers primarily lectured on theoretical concepts, grammar rules, and typical programming cases, while students practiced programming through homework assignments outside of class. While this approach helped ensure a structured understanding of the material, it inherently had limitations.
Traditional teaching resources are limited and slow to update, primarily relying on textbooks, teachers’ personal experience, and the school’s internal teaching platform. As a result, students were exposed to a narrow range of knowledge. When confronted with complex programming concepts and algorithms, students struggled to fully understand these topics through oral explanations and simple examples alone. In practice, students had to wait for teachers to address their questions, leading to long feedback cycles that negatively impacted student engagement and learning efficiency.
In the field of Python programming education, numerous studies have been conducted on the integration of artificial intelligence (AI) to enhance learning outcomes. For instance, in [3], Lin X. explored how intelligent tutoring systems could improve student performance by providing personalized learning paths and immediate feedback, emphasizing AI’s ability to identify individual weaknesses and recommend tailored materials. Similarly, in [4], Smith et al. propose a model leveraging AI algorithms for personalized content recommendations, adjusting course materials based on students’ learning data to facilitate better mastery of Python concepts. Furthermore, in [5], Chen et al. evaluate a chatbot-assisted learning environment that provides instant support and programming practice, with students reporting increased motivation and engagement through this interactive platform. Lastly, Martinez [6] presents a comprehensive review of AI technologies in Python education, discussing tools like automated grading and learning analytics that improve educational efficiency while empowering teachers. In [7], Zabala et al. introduce an AI-based Python programming education system that integrates a chatbot for student assistance, an automated grading system for feedback, and an entrance exam feature that suggests chapters and sections for review.
With the rise of artificial intelligence technology, modern teaching has gained new opportunities [8]. Students now have access to powerful AI tools such as ERNIE Bot (WenXinYiyan), Doubao, Kimi, and ChatGPT. These tools can generate code snippets based on students’ needs, helping them understand programming logic and syntax while coding. They also offer a wide range of project cases, technical documentation, and the latest industry trends, thereby expanding learning resources. Moreover, these tools provide immediate answers to students’ questions and foster creative thinking in problem-solving, enhancing students’ autonomy and flexibility in learning [9]. However, while leveraging the advantages of AI, it is crucial to prevent students from becoming overly reliant on technology and ensure that they master the core knowledge and skills of programming. Achieving this balance is key to the success of teaching reform.
Despite the advantages, there is a lack of studies evaluating the impact of these AI tools on education. Therefore, it is essential to explore the role and effects of the AI tools on Python education, providing educators with valuable insights for integrating AI in teaching and understanding its broader implications for education.
3. Teaching Reform Methods
To demonstrate the impact of artificial intelligence on the Python programming course, we divided the students into two categories: those with access to artificial intelligence tools and those without. By conducting this comparative experiment, we aim to use data to illustrate the influence of AI tools on students’ learning.
In the Autumn semester of 2024, 65 students majoring in Electronic Science and Technology at Nanfang College Guangzhou, enrolled in the Python Programming course. The students were divided into five groups based on their choice to use AI tools: Doubao, Kimi, ERNIE Bot, ChatGPT, and a non-AI tool group. The grouping process took into account factors such as students’ programming foundation and learning abilities to ensure balance and comparability between the groups, thus enhancing the credibility of the research findings.
Based on students’ preferences for AI tools, they were divided into five groups, and a voting survey was conducted. Six students abstained from voting. The results, shown in Figure 1, indicate that a larger proportion of students chose to use ERNIE Bot, accounting for 40.7%.
Figure 1. Groups of students using different AI tools.
3.1. Teaching Process Implementation
3.1.1. Course Content Design
The teaching is conducted in strict accordance with the standard syllabus for the Python programming course, covering core modules such as basic syntax, Python libraries, algorithm design, and project practice. In teaching basic syntax, in addition to conventional explanations, teachers guide students to use AI to explore the application scenarios of various syntax rules in different project contexts. For instance, when explaining conditional statements, students are asked to use AI to search for examples of conditional judgment in data analysis and graphical visualization, and then make comparisons [10].
For the groups using AI tools, teachers provide timely guidance to help students expand their learning of code examples with the assistance of AI [11]. For example, when studying a specific algorithm, students are instructed to request multiple algorithm implementations from AI tools and compare their advantages and disadvantages to deepen their understanding. Simultaneously, teachers guide students in using AI to explore the analysis and problem-solving approaches for complex issues. For instance, when working with image encryption algorithms, students can use AI tools to examine the differences in processing speed, accuracy, and resource consumption across various encryption algorithms [12], enabling them to select more suitable algorithms for further research and application.
For the group without access to AI tools, personalized tutoring and group collaborative learning are emphasized. Classroom interaction is increased, typical cases are explained in detail, and practical exercises are carefully designed [13]. For example, group programming competitions are organized, with teachers providing on-site guidance and addressing each group’s issues.
Project-driven teaching is introduced, with a series of Python projects designed for practical application, such as data analysis systems, small game development, and intelligent customer service systems [14]. All students are required to complete these projects in groups. The groups using AI tools are encouraged to use AI appropriately to plan, generate code, and troubleshoot problems, while the non-AI group relies on close collaboration among team members and the guidance of teachers to overcome challenges in project development, thereby enhancing students’ overall programming skills and fostering teamwork.
3.1.2. Learning Process Monitoring
A comprehensive learning process monitoring system is established, with regular collection of multi-dimensional data, such as code homework completion, project report quality, and classroom performance [15]. Teachers correct and comment on students’ code homework weekly and provide a comprehensive evaluation of project reports, assessing aspects such as project innovation, feasibility, and the rationality of technology application.
Students using AI tools are required to document their entire process of using AI, along with their personal gains. Teachers regularly review these records and engage in discussions with students to understand their challenges and experiences.
Special attention is given to the learning progress and difficulties of the non-AI tool group, with teaching strategies adjusted flexibly. For instance, if a particular group encounters difficulties understanding a specific concept [16], additional case explanations or group discussions may be organized to deepen students’ understanding.
Online learning platforms are utilized to track the learning process in real time [17], recording data such as learning time, participation in discussions, and resource downloads. This data is analyzed to identify students’ learning behavior patterns, providing a basis for personalized teaching and enabling timely intervention for students exhibiting low engagement or encountering learning difficulties.
3.1.3. Teaching Method Innovation
We propose adopting the flipped classroom teaching model. Some of the teaching content is converted into micro-videos or learning materials for students to engage in autonomous learning before class, while classroom time focuses on problem discussion, project practice, and knowledge expansion. Students using AI tools are encouraged to preview relevant knowledge using AI and prepare questions for in-depth discussion with teachers and classmates during class [18], while students in the non-AI tool group preview materials through traditional methods, such as reading textbooks and watching instructional videos. In class, teachers actively guide students through group discussions, encourage them to share their learning experiences and challenges, and jointly explore solutions to promote a deeper understanding and mastery of knowledge, as well as cultivate cooperative learning and problem-solving skills.
Teaching activities that combine group cooperation learning and inquiry-based learning are implemented. During group formation, care is taken to ensure that each group includes students with different levels of AI tool usage to promote communication and learning among students [19]. In the process of project practice, group members are encouraged to leverage their individual strengths, collaborate effectively, and jointly explore the best solutions to problems. For instance, when developing a data analysis system, students using different AI tools can obtain various ideas and code snippets for data processing with the help of the tools. The group then collaborates to discuss how to integrate these resources and optimize system performance to meet project objectives [20]. Teachers play the roles of guides and supervisors, providing timely guidance and inspiration, and fostering students’ teamwork and innovation skills.
The situational teaching method is applied, creating teaching scenarios closely aligned with practical applications, such as enterprise data processing requirements [21], internet application development scenarios [22], and financial data analysis contexts. Students are tasked with using Python knowledge and AI tools to solve practical problems within specific situations, thereby enhancing their learning interests and practical abilities. For example, a simulated e-commerce platform data mining scenario is set up, where students must use Python to collect and clean data, and then apply AI tools to optimize the analysis algorithms to mine valuable business insights [23], such as user purchase behavior patterns and product recommendation strategies. This approach helps students deeply understand the practical value of knowledge and stimulates their learning motivation.
3.2. Evaluation Index System Construction
3.2.1. Programming Ability Evaluation
It needs to comprehensively evaluate students’ programming ability from multiple dimensions such as code writing accuracy
, efficiency
, standardization
and complex problem-solving ability
. Design a series of hierarchical and comprehensive programming test questions, including basic grammar knowledge test
, algorithm application ability test
, project development practical test
, etc., and conduct strict assessments in the middle and end of the course. At the same time, the test scores of each chapter are included in the evaluation of programming ability. The comprehensive score
of programming ability can be expressed as:
(where
are the weights of each dimension and test type, and
) We can also consider a more complex formula to evaluate programming ability. This example assumes that the complexity of the code is denoted as
,the degree of code reuse is denoted as
, and the error handling ability is denoted as
. Then the comprehensive score
of programming ability can be further expressed as:
(where
are adjustment coefficients related to code complexity, reuse and error handling ability).
3.2.2. Innovative Thinking Evaluation
We examine the innovation elements of the project, such as algorithm innovation
, functional module innovation
, solution innovation
, etc. Through comprehensive evaluation and scoring of project reports
, classroom presentation performance
and innovative speech in group discussions
, the score
of innovative thinking can be expressed as:
(where
are the weights of each innovation element and evaluation link, and
).
3.2.3. Learning Attitude and Autonomy Evaluation
Let’s observe students’ classroom participation
, frequency
and quality of active questions, investment and allocation of after-class autonomous learning time
, etc. For the groups using AI tools, additionally evaluate their active exploration spirit
and self-learning management ability
of AI tools; for the non-AI tool group, focus on their self-driving force
and learning perseverance
. The score
of learning attitude and autonomy can be expressed as:
(where
are the weights of each factor).
3.2.4. Comprehensive Performance Evaluation
We comprehensively consider factors such as chapter test scores
, final examination scores
, innovative thinking
, learning attitude and autonomy
to calculate students’ comprehensive performance
, that is:
(where
are the weights of each factor). At the same time, the award situation of subject competitions is included. The award level is set as
(first prize
, second prize
, third prize
), and the number of awardees is
. Then the competition score
, and the final comprehensive performance can be expressed as:
(where
is the adjustment weight,
).
4. Analysis of Teaching Reform Results
4.1. Comparison of Programming Ability Improvement
The errors of programming can be detected by large language models AI tools [24]. And it showed in our experiments. In Table 1, the Improvement is code writing speed improvement ratio, and the Error is the data of programming mistakes students made. Accuracy is the accuracy Score of code, and the score is the comprehensive programming ability score students g0t.
Table 1. Comparison of different groups on various metrics.
Group |
Improvement |
Error |
Accuracy |
Score |
Doubao |
About 27% |
5% |
80 |
85 |
Kimi |
About 26% |
6% |
78 |
83 |
ERNIE bot |
About 28% |
7% |
75 |
84 |
ChatGPT |
About 26% |
8% |
76 |
82 |
Non-AI tool |
None |
3% |
90 |
80 |
The code accuracy metric was measured by testing students’ code against predefined test cases. Specific criteria include the correctness of output (whether the code produced the expected results), error-free execution (no syntax or runtime errors), and efficiency (optimized time and space complexity). An automated testing system compared the output to the expected results, awarding points based on the percentage of test cases passed. Partial credit was given for solutions that passed some but not all test cases. This ensured an objective and consistent evaluation of code accuracy.
In the comprehensive programming ability test at the end of the course, the four groups using AI tools have an advantage in code writing speed. Because AI can quickly provide code framework examples, students can save time by modifying and improving them. However, in terms of code accuracy, the non-AI tool group has a lower error rate due to more strict training and guidance from teachers. Some students in the AI tool groups rely too much on AI-generated code and have a shallow understanding of code logic and weak debugging ability, resulting in some avoidable low-level errors. However, from the overall comprehensive programming ability score, the average score of the groups using AI tools is slightly higher, which indicates that AI helps to improve students’ programming ability to a certain extent, but teachers need to strengthen the cultivation of students’ independent judgment and code understanding ability in the teaching process.
4.2. Comparison of Innovative Thinking Stimulation
The innovative thinking metric was measured by assessing the creativity and originality of students’ problem-solving approaches. Specific criteria include the novelty of the approach, such as using unique algorithms or data structures, and the integration of AI tools, with students being evaluated on how effectively they used AI tools (e.g., ChatGPT, Doubao) to enhance their solutions. Students were required to submit a reflection report explaining their approach and how AI tools were integrated, which was reviewed by instructors to assess the level of innovation. This ensured an objective evaluation of students’ creativity in problem-solving.
When we accomplished the stimulation, it showed that in Table 2: Doubao Group leads with 9 project innovation elements and the highest evaluation score of 92, indicating strong creativity. ChatGPT Group follows closely with 8 elements and a score of 90, showing excellent innovative thinking. ERNIE Bot Group has 7 elements and a score of 88, indicating good but slightly lower performance. Kimi Group shows moderate innovation with 6 elements and a score of 85. The Non-AI Tool Group has the least with only 3 elements and a score of 75, suggesting limitations in innovation compared to AI groups. Overall, AI-related groups
Table 2. Comparison of different groups for innovation evaluation.
Group |
Number of project innovation elements |
Innovative thinking evaluation score |
Doubao |
9 |
92 |
Kimi |
6 |
85 |
ERNIE bot |
7 |
88 |
ChatGPT |
8 |
90 |
Non-AI tool |
3 |
75 |
significantly outperform the Non-AI Tool Group in both innovation elements and evaluation scores.
The groups using AI tools have more active innovative thinking in project development. For example, in a data analysis project developed by the Doubao group, through in-depth interaction with Doubao, students learned some cutting-edge data processing algorithms and visualization technologies and skillfully applied them to the project, significantly improving the innovation and practicability of the project and obtaining a high score in the innovative thinking evaluation. The ERNIE Bot group designed unique game levels and interaction modes with the inspiration of creative ideas in the game project development and performed outstandingly in the innovative thinking evaluation. In contrast, the non-AI tool group has a single information access channel, mainly relying on the cases provided by teachers and traditional teaching resources, facing great challenges in the expansion of innovative thinking and having relatively few innovation achievements.
4.3. Comparison of Changes in Learning Attitude and Autonomy
To assess the students’ learning attitude and autonomy, we employ the Participation Score, Implementation Score, and Autonomous Learning as indicators to present the experimental outcomes. We compared different groups and the result is shown in Table 3. The ChatGPT Group and Doubao Group demonstrate strong initial scores and effective improvements, while the ERNIE Bot Group excels in autonomous learning time. The Non-AI Tool Group lags behind in all metrics, highlighting the advantages of AI tools in fostering innovation and learning.
Table 3. Comparison of different groups for learning attitude and autonomy.
Group |
Participation score |
Implementation score |
Autonomous learning |
Doubao |
9 |
6 |
+2 hours/week |
Kimi |
8 |
5 |
+1.5 hours/week |
ERNIE bot |
8.5 |
5.5 |
+2.2 hours/week |
ChatGPT |
9.5 |
6.5 |
+1.9 hours/week |
Non-AI tool |
6 |
4 |
+0.5 hours/week |
The groups using AI tools show high initial learning enthusiasm as they are curious about and eager to explore AI. They actively participate and learn, and invest more time in after-class study to improve programming skills, which significantly stimulates learning autonomy. And they excuse the learning plan better than the Non-AI group does.
4.4. Comprehensive Performance and Subject Competition
Results Analysis
We evaluated students’ comprehensive performance through the average score obtained in an assessment and the number of awards won in subject competitions and the results were in Table 4.
Table 4. Comparison of different groups for competition award.
Group |
Score |
Winners |
Award levels |
Doubao |
90 |
3 |
First: 1, Second: 1, Third: 1 |
Kimi |
85 |
2 |
Second: 1, Third: 1 |
ERNIE bot |
86 |
2 |
Second: 1, Third: 1 |
ChatGPT |
87 |
2 |
Second: 1, Third: 1 |
Non-AI tool |
80 |
1 |
Third: 1 |
From the perspective of comprehensive performance, the groups using AI tools had a slightly higher average score when the students attended a programming competition in Guangdong province of China. This is mainly due to the role of AI in knowledge expansion and programming efficiency improvement. However, some students’ over-reliance on AI leads to certain deductions, which offset some of the advantages. In chapter tests and final examinations, the groups using AI tools performed better in questions related to innovative thinking and knowledge application, while the non-AI tool group had more stable scores in basic knowledge and code accuracy questions. In subject competitions, the groups using AI tools have higher participation enthusiasm and more winners, indicating that AI can promote the improvement of students’ innovative practical ability and competition performance. However, it is necessary to guide students in using AI correctly to avoid violations.
5. Significant Value of Artificial Intelligence in Teaching
5.1. Enriching Teaching Resources and Methods
Artificial intelligence tools provide a vast amount of rich and timely updated teaching resources for Python programming courses [25], such as diverse code examples, detailed teaching cases, and cutting-edge technical documents. Teachers can integrate these resources to make teaching content more vivid and three-dimensional. Meanwhile, the AI intelligent question-answering system can answer students’ questions in real-time, and the personalized learning recommendation function can accurately push materials according to students’ situations, improving the pertinence and efficiency of teaching and meeting the personalized learning needs of different students.
5.2. Stimulating Students’ Innovative Ability
Through in-depth interaction with artificial intelligence, students break through the limitations of traditional teaching resources, get in touch with cutting-edge innovative knowledge, technology and concepts, broaden their thinking and knowledge boundaries, and effectively stimulate innovative thinking. In project development practice, AI tools provide inspiration and ideas at critical moments [26], helping students break through traditional thinking patterns, try novel design schemes, and develop more innovative and competitive project works, providing strong support for cultivating students’ innovative spirit and practical ability.
5.3. Cultivating Students’ Information Literacy and Autonomous Learning Ability
When using AI tools, students need to screen, analyze, integrate and judge a large amount of information and discriminate the rationality and reliability of AI-generated content. This process cultivates students’ information literacy, enabling them to efficiently acquire, accurately evaluate and rationally use information in the information age. Reasonable guidance for students to use AI tools for autonomous learning can exercise their autonomous learning planning [27], self-management and self-evaluation abilities, helping them develop good autonomous learning habits and laying a foundation for lifelong learning.
6. Conclusion and Outlook
The exploration and implementation of AI-powered teaching reform in the Python programming course for senior students majoring in Electronic Science and Technology at Nanfang College Guangzhou, reveals that while artificial intelligence offers significant advantages and holds substantial value in education, challenges such as students’ over-reliance on AI tools and a lack of critical thinking regarding AI-generated content remain. Moving forward, it is essential for educators to refine teaching methods and strategies, ensuring students use AI tools scientifically and supervised. Emphasis should be placed on fostering autonomous learning, innovative thinking, and critical thinking skills. By leveraging the complementary strengths of AI and traditional teaching approaches, an efficient, intelligent, and innovative teaching model can be developed, facilitating the cultivation of high-quality professionals in Electronic Science and Technology who can meet the demands of the rapidly advancing technological landscape. Furthermore, ongoing attention must be paid to the evolving applications, challenges, and trends of AI in education. This will enable timely adjustments to teaching reform strategies, thereby advancing the modernization of educational practices.
Conflicts of Interest
The author declares no conflicts of interest.