A Study on AI-Driven Question Generation Using ChatGPT for Python Programming Education
Keywords:
Programming education, Python, ChatGPT in Education, Question generation, Teaching Assistance ToolsAbstract
Programming education is becoming more essential due to the increasing demands on coding skills and computer literacy. Consequently, many professional schools and universities are providing programming courses to train future programming engineers. However, making quizzes and practice questions for diverse programming topics can be time-consuming for the teachers, reducing the time they can spend on teaching, such as guiding students and providing personalized feedback. In this paper, we propose an AI-driven question generation using ChatGPT to support Python programming education. We developed an automated program that can generate three types of questions to cover basic programming concepts: Code Understanding Questions, Output Prediction Questions, and Code Completion Questions by using ChatGPT's language model (LM). For evaluations, we have prepared 28 python source codes and applied 140 generated questions to our Language Understanding lab members in online setting. The examination was conducted as an unsupervised, open-book assessment, allowing participants to reference materials while answering the questions. This setup aimed to simulate a realistic self-learning environment, reflecting how students typically engage with AI-generated questions outside of formal classroom settings. The application results confirm the validity of the proposal and our initial findings indicate that AI-generated questions are effective in supporting both educators and students for Python programming education.
References
"Top Programming Languages 2024," IEEE Spectrum. Accessed: Jul. 31, 2025. [Online]. Available: https://spectrum.ieee.org/top-programming-languages-2024
M. Heilman and N. A. Smith, “Good question! Statistical ranking for question generation,” in Proc. Human Lang. Technol. Conf. North Amer. Chapter Assoc. Comput. Linguistics (HLT-NAACL), 2010, pp. 609–617.
R. Mitkov, H. L. An, and N. Karamanis, “A computer-aided environment for generating multiple-choice test items,” Natural Language Engineering, vol. 12, no. 2, pp. 177–194, 2006.
J. Finnie-Ansley, P. Denny, B. A. Becker, A. Luxton-Reilly, and J. Prather, “The robots are coming: Exploring the implications of OpenAI Codex on introductory programming,” in Proc. 24th Australasian Comput. Edu. Conf. (ACE), 2022, pp. 10–19.
T. Brown, B. Mann, N. Ryder, M. Subbiah, J. D. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, and A. Askell, “Language models are few-shot learners,” Advances in Neural Information Processing Systems, vol. 33, pp. 1877–1901, 2020.
E. Latif, G. Mai, M. Nyaaba, X. Wu, N. Liu, G. Lu, S. Li, T. Liu, and X. Zhai, “Artificial general intelligence (AGI) for education,” arXiv preprint arXiv:2304.12479, 2023.
C. Kooli, “Chatbots in education and research: A critical examination of ethical implications and solutions,” Sustainability, vol. 15, no. 7, p. 5614, 2023.
G. Cruz, J. Jones, M. Morrow, A. Gonzalez, and B. Gooch, “An AI system for coaching novice programmers,” in Lecture Notes in Computer Science, vol. 10296, Springer, Cham, 2017, pp. 12–21.
S. MacNeil, A. Tran, J. Leinonen, P. Denny, J. Kim, A. Hellas, S. Bernstein, and S. Sarsa, “Automatically generating CS learning materials with large language models,” in Proc. ACM Tech. Symp. Comput. Sci. Edu. (SIGCSE), 2023, p. 1176.
