【关 键 词 】：
富有成效的失败； 协作编程； 编程技能； 编程态度； 问题解决能力
With the rapid development of artificial intelligence, the courses related to artificial intelligence have been offered in primary and secondary schools. Programming courses play a fundamental role in learning artificial intelligence, so the relevant courses can be found in many primary and secondary schools. However, the teaching and learning methods used to improve learners' programming skills is thefocus of researchers. In this paper, a collaborative programming based on productive failure is adopted to conduct an empirical study for more than three months in Arduino course in Grade 5. Both qualitative and quantitative analysis methods are used to track the programming process and results of learners. The results indicate that collaborative programming based on productive failure can significantly improve students' programming skills, programming attitudes, and problem-solving abilities of Grade 5 in primary school.