skip to main content
research-article

A Controlled Experiment on Python vs C for an Introductory Programming Course: Students’ Outcomes

Published:09 August 2018Publication History
Skip Abstract Section

Abstract

We performed a controlled experiment comparing a C and a Python Introductory Programming course. Three faculty members at University of Campinas, Brazil, taught the same CS1 course for the same majors in two different semesters, one version in Python and one in C, with a total of 391 students involved in the experiment. We measured the dropout rate, the failure rate, the grades on the two exams, the proportion of completed lab assignments, and the number of submissions per completed assignment. There was no difference in the dropout rate. The failure rate for Python was 16.9% against 23.1% for C. The effect size (Cohen’s D) on the comparison of Python against C on the midterm exam was 0.27, and 0.38 for the final exam. The effect size for the proportion of completed assignments was 0.39 and the effect size for the number of submissions per assignment was -0.61 (Python had less submissions per completed assignments). Thus, for all measures, with the exception of dropout rate, the version of the course in Python yielded better student outcomes than the version in C and all differences are significant (with 95% confidence) with the exception of the failure rate (p-value=0.12).

References

  1. Irwin Bross. 1954. A confidence interval for a percentage increase. Biometrics 10, 2 (1954), 245--250.Google ScholarGoogle ScholarCross RefCross Ref
  2. Jacob Cohen. 1988. Statistical Power Analysis for the Behavioral Sciences. Lawrence Earlbaum Associates.Google ScholarGoogle Scholar
  3. Stephen Cooper, Wanda Dann, and Randy Pausch. 2003. Teaching objects-first in introductory computer science. ACM SIGCSE Bulletin 35, 1 (2003), 191--195. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Paul Denny, Andrew Luxton-Reilly, and Ewan Tempero. 2012. All syntax errors are not equal. In 17th ACM Conference on Innovation and Technology in Computer Science Education. 75--80. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Paul Denny, Andrew Luxton-Reilly, Ewan Tempero, and Jacob Hendrickx. 2011. Understanding the syntax barrier for novices. In 16th Annual Conference on Innovation And Technology in Computer Science Education. 208--212. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Albrecht Ehlert and Carsten Schulte. 2009. Empirical comparison of objects-first and objects-later. In 5th International Workshop on Computing Education Research. 15--26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Richard J. Enbody and William F. Punch. 2010. Performance of python CS1 students in mid-level non-python CS courses. In 41st ACM Technical Symposium on Computer Science Education. ACM, 520--523. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Richard J. Enbody, William F. Punch, and Mark McCullen. 2009. Python CS1 as preparation for C++ CS2. ACM SIGCSE Bulletin 41, 1 (2009), 116--120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Scott Freeman, Sarah L. Eddy, Miles McDonough, Michelle K. Smith, Nnadozie Okoroafor, Hannah Jordt, and Mary Pat Wenderoth. 2014. Active learning increases student performance in science, engineering, and mathematics. Proceedings of the National Academy of Sciences 111, 23 (2014), 8410--8415.Google ScholarGoogle ScholarCross RefCross Ref
  10. Ernie Giangrande Jr. 2007. CS1 programming language options. Journal of Computing Sciences in Colleges 22, 3 (2007), 153--160. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Michael H. Goldwasser and David Letscher. 2008. Teaching an object-oriented CS1 -: With Python. ACM SIGCSE Bulletin 40, 3 (2008), 42--46. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Philip Guo. 2014. Python is now the most popular introductory teaching language at top U.S. universities. BLOG@CACM http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-u-s-universities/fulltext.Google ScholarGoogle Scholar
  13. Stefan Hanenberg, Sebastian Kleinschmager, Romain Robbes, Éric Tanter, and Andreas Stefik. 2014. An empirical study on the impact of static typing on software maintainability. Empirical Software Engineering 19, 5 (2014), 1335--1382. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. David C. Howell. 2011. Confidence intervals on effect size. Lecture handout. Psychology. University of Vermont.Google ScholarGoogle Scholar
  15. John M. Hunt. 2015. Python in CS1-not. Journal of Computing Sciences in Colleges 31, 2 (2015), 172--179. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Jussi Kasurinen and Uolevi Nikula. 2007. Lower dropout rates and better grades through revised course infrastructure. In 10th IASTED International Conference on Computers and Advanced Technology in Education. 152--157. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Ken Kelley and Kristopher J. Preacher. 2012. On effect size. Psychological Methods 17, 2 (2012), 137.Google ScholarGoogle ScholarCross RefCross Ref
  18. Sebastian Kleinschmager, Romain Robbes, Andreas Stefik, Stefan Hanenberg, and Eric Tanter. 2012. Do static type systems improve the maintainability of software systems? An empirical study. In 20th IEEE International Conference on Program Comprehension. 153--162.Google ScholarGoogle ScholarCross RefCross Ref
  19. Theodora Koulouri, Stanislao Lauria, and Robert D. Macredie. 2015. Teaching introductory programming: A quantitative evaluation of different approaches. ACM Transactions on Computing Education 14, 4 (2015), 26. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Sarah K. Kummerfeld and Judy Kay. 2003. The neglected battle fields of syntax errors. In 5th Australasian Conference on Computing Education. 105--111. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Linda Mannila, Mia Peltomäki, and Tapio Salakoski. 2006. What about a simple language? Analyzing the difficulties in learning to program. Computer Science Education 16, 3 (2006), 211--227.Google ScholarGoogle ScholarCross RefCross Ref
  22. Guillaume Marceau, Kathi Fisler, and Shriram Krishnamurthi. 2011. Measuring the effectiveness of error messages designed for novice programmers. In 42nd ACM Technical Symposium on Computer Science Education. 499--504. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Clemens Mayer, Stefan Hanenberg, Romain Robbes, Éric Tanter, and Andreas Stefik. 2012. An empirical study of the influence of static type systems on the usability of undocumented software. ACM SIGPLAN Notices 47, 10 (2012), 683--702. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Bradley N. Miller and David L. Ranum. 2005. Teaching an introductory computer science sequence with Python. In 38th Midwest Instructional and Computing Symposium.Google ScholarGoogle Scholar
  25. Ellen Murphy, Tom Crick, and James H. Davenport. 2016. An analysis of introductory university programming courses in the UK. arXiv:1609.06622 (2016).Google ScholarGoogle Scholar
  26. Marie-Hélène Nienaltowski, Michela Pedroni, and Bertrand Meyer. 2008. Compiler error messages: What can help novices? ACM SIGCSE Bulletin 40, 1 (2008), 168--172. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Sebastian Okon and Stefan Hanenberg. 2016. Can we enforce a benefit for dynamically typed languages in comparison to statically typed ones? A controlled experiment. In 24th IEEE International Conference on Program Comprehension. 1--10.Google ScholarGoogle ScholarCross RefCross Ref
  28. Joseph D. Oldham. 2005. What happens after python in CS1? Journal of Computing Sciences in Colleges 20, 6 (2005), 7--13. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Holly Patterson-McNeill. 2006. Experience: From C++ to python in 3 easy steps. Journal of Computing Sciences in Colleges 22, 2 (2006), 92--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Arnold Pears and Lauri Malmi. 2009. Values and objectives in computing education research. ACM Transactions on Computing Education 9, 3 (2009), 15. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Arnold Pears, Stephen Seidman, Lauri Malmi, Linda Mannila, Elizabeth Adams, Jens Bennedsen, Marie Devlin, and James Paterson. 2007. A survey of literature on the teaching of introductory programming. ACM SIGCSE Bulletin 39, 4 (2007), 204--223. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Leo Porter, Cynthia Bailey Lee, and Beth Simon. 2013. Halving fail rates using peer instruction: A study of four computer science courses. In 44th ACM Technical Symposium on Computer Science Education. 177--182. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Vennila Ramalingam and Susan Wiedenbeck. 1997. An empirical study of novice program comprehension in the imperative and object-oriented styles. In 7th Workshop on Empirical Studies of Programmers. 124--139. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Stuart Reges. 2006. Back to basics in CS1 and CS2. ACM SIGCSE Bulletin 38, 1 (2006), 293--297. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Norsaremah Salleh, Emilia Mendes, and John Grundy. 2011. Empirical studies of pair programming for CS/SE teaching in higher education: A systematic literature review. IEEE Transactions on Software Engineering 37, 4 (2011), 509--525. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Christine Shannon. 2003. Another breadth-first approach to CS1 using python. ACM SIGCSE Bulletin 35, 1 (2003), 248--251. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Robert Michael Siegfried, Jason Siegfried, and Gina Alexandro. 2016. A longitudinal analysis of the reid list of first programming languages. Information Systems Education Journal 14, 6 (2016), 47.Google ScholarGoogle Scholar
  38. Gabriela Silva-Maceda, P. David Arjona-Villicaña, and F. Edgar Castillo-Barrera. 2016. More time or better tools? A large-scale retrospective comparison of pedagogical approaches to teach programming. IEEE Transactions on Education 59, 4 (2016), 274--281. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Andreas Stefik and Susanna Siebert. 2013. An empirical investigation into programming language syntax. ACM Transactions on Computing Education 13, 4 (2013), 19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Murat P. Uysal. 2012. The effects of objects-first and objects-late methods on achievements of OOP learners. Journal of Software Engineering and Applications 5, 10 (2012), 816.Google ScholarGoogle ScholarCross RefCross Ref
  41. Christopher Watson and Frederick W. B. Li. 2014. Failure rates in introductory programming revisited. In Conference on Innovation 8 Technology in Computer Science Education. 39--44. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Aharon Yadin. 2011. Reducing the dropout rate in an introductory programming course. ACM Inroads 2, 4 (2011), 71--76. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A Controlled Experiment on Python vs C for an Introductory Programming Course: Students’ Outcomes

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM Transactions on Computing Education
      ACM Transactions on Computing Education  Volume 18, Issue 3
      September 2018
      120 pages
      EISSN:1946-6226
      DOI:10.1145/3266362
      Issue’s Table of Contents

      Copyright © 2018 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 9 August 2018
      • Accepted: 1 October 2017
      • Revised: 1 September 2017
      • Received: 1 April 2017
      Published in toce Volume 18, Issue 3

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader