Comparative Analysis of ChatGPT vs. Claude for Solving Introductory Python Exercises in Engineering

Authors

  • Luis Eduardo Muñoz Guerrero Universidad Tecnológica de Pereira, Colombia

Keywords:

ChatGPT , Claude , Python, Artificial Intelligence.

Abstract

The rapid integration of Large Language Models (LLMs) into educational environments has fundamentally altered how engineering students approach introductory programming courses. While students increasingly rely on AI assistants for code generation and debugging, there remains a significant gap in empirical research comparing the pedagogical efficacy, code correctness, and explanation clarity of leading models in academic settings. This paper presents an extensive comparative analysis between two state-of-the-art LLMs, OpenAI's ChatGPT (GPT-4) and Anthropic's Claude (Claude 3 Opus), evaluating their performance in solving introductory Python exercises typical of a first-year Systems Engineering curriculum. A dataset of 50 standardized programming tasks—ranging from basic control structures to data manipulation and algorithmic design—was administered to both models using rigorous zero-shot prompting methodologies. The models' responses were evaluated based on code correctness, execution efficiency, and the clarity and educational value of the generated text explanations. Preliminary results indicate that while both models achieve a remarkably high success rate of over 92% in immediate code compilation and execution, their pedagogical approaches diverge significantly. Claude demonstrates a measured advantage in generating more pedagogically sound, step-by-step explanations, making it highly suitable for conceptual learning. Conversely, ChatGPT excels in producing concise, highly optimized algorithmic solutions, proving highly effective for rapid prototyping and debugging. These findings suggest that rather than viewing AI tools merely as code generators, educators must recognize their distinct interaction profiles. By leveraging the Guidance-Practice-Transformation framework, instructional designers can integrate these AI tools to foster deeper cognitive engagement, ensuring that students do not fall into the 'copy-paste trap' but instead utilize LLMs as robust, personalized tutoring systems.

Downloads

Published

2024-03-15

How to Cite

Guerrero, L. E. M. (2024). Comparative Analysis of ChatGPT vs. Claude for Solving Introductory Python Exercises in Engineering. Journal of International Crisis and Risk Communication Research , 1125–1131. Retrieved from https://jicrcr.com/index.php/jicrcr/article/view/3774

Issue

Section

Articles