Python versus C++: An analysis of student struggle on small coding exercises in introductory programming courses

Nabeel Alzahrani, Frank Vahid, Alex Edgcomb, Kevin Nguyen, Roman Lysecky

Research output: Chapter in Book/Report/Conference proceedingConference contribution

24 Scopus citations

Abstract

Many teachers of CS 1 (introductory programming) have switched to Python rather than C, C++, or Java. One reason is the belief that Python’s interpreted nature plus simpler syntax and semantics ease a student’s learning, but data supporting that belief is scarce. This paper addresses the question: Do Python learners struggle less than C++ learners? We analyzed student submissions on small coding exercises in CS 1 courses at 20 different universities, 10 courses using Python, and 11 using C++. Each course used either the Python or C++ version of an online textbook from one publisher, each book having 100+ small coding exercises, expected to take 2-5 minutes each. We considered 11 exercises whose Python and C++ versions were nearly identical and that appeared in various chapters. We defined struggle rate for exercises, where struggle means a student spent excessive time or attempts on an exercise. Based on that rate, we found the learning for Python was not eased; in fact, Python students had significantly higher struggle rates than C++ students (26% vs. 13%). Higher rates were seen even when considering only classes with no prerequisites, classes for majors only, or classes for non-majors only. We encourage the community to do further analyses, to help guide teachers when choosing a CS 1 language.

Original languageEnglish (US)
Title of host publicationSIGCSE 2018 - Proceedings of the 49th ACM Technical Symposium on Computer Science Education
PublisherAssociation for Computing Machinery, Inc
Pages86-91
Number of pages6
ISBN (Electronic)9781450351034
DOIs
StatePublished - Feb 21 2018
Event49th ACM Technical Symposium on Computer Science Education, SIGCSE 2018 - Baltimore, United States
Duration: Feb 21 2018Feb 24 2018

Publication series

NameSIGCSE 2018 - Proceedings of the 49th ACM Technical Symposium on Computer Science Education
Volume2018-January

Other

Other49th ACM Technical Symposium on Computer Science Education, SIGCSE 2018
Country/TerritoryUnited States
CityBaltimore
Period2/21/182/24/18

ASJC Scopus subject areas

  • General Computer Science
  • Education

Fingerprint

Dive into the research topics of 'Python versus C++: An analysis of student struggle on small coding exercises in introductory programming courses'. Together they form a unique fingerprint.

Cite this