Disclosure: Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.


The Best Intro to Programming Courses for Data Science — Class Central Career Guides

Find out which is the best online intro to programming online course for people breaking into the data science

Editors note: Drop us a note at [email protected] if you have any feedback or requests for particular career guides. We are also looking for contributors!

Here are the parts of the series that have been published so far:

  1. The Best Intro to Programming Courses for Data Science (this one)
  2. The Best Statistics & Probability Courses for Data Science 
  3. The Best Intro to Data Science Courses
  4. The Best Data Visualization Courses
  5. The Best Machine Learning Courses

Career Guide 1 (courses)

Our pick

The best online intro to programming course for people breaking into the data science field is the University of Toronto’s “Learn to Program” series on Coursera. “LTP1: The Fundamentals” and “LTP2: Crafting Quality Code” have a near-perfect weighted average rating of 4.71/5 stars over 284 reviews, and they have a great mix of content difficulty and scope for the beginner data scientist. This free, Python-based introduction to programming sets itself apart from the other 20+ courses considered.

Learn To Program: The Fundamentals by the University of Toronto on Coursera

Learn to Program: Crafting Quality Code by the University of Toronto on Coursera


Another great Python option

If you already have some familiarity with programming and don’t mind a syllabus that has a notable skew towards games and interactive applications, I would also recommend Rice University’s “An Introduction to Interactive Programming in Python (Part 1 and Part 2)” on Coursera. With 6,000+ reviews and the highest weighted average rating of 4.93/5 stars, this popular course is noted for its engaging videos, challenging quizzes, and enjoyable mini projects. It is slightly more difficult and focuses less on the fundamentals and more on topics that aren’t applicable in data science than our #1 pick. These courses are also part of the 7-course Principles in Computing Specialization on Coursera.

An Introduction to Interactive Programming in Python (Part 1) by Rice University on Coursera

An Introduction to Interactive Programming in Python (Part 2) by Rice University on Coursera

CodeSkulptor: Browser-based Python programming environment used for Rice University’s MOOCs.

If you are set on R

If you are set on an introduction to programming course in R, we recommend DataCamp’s series of R courses: “Introduction to R,” “Intermediate R,” “Intermediate R – Practice,” and “Writing Functions in R.” Though the latter three come at a price point of $25/month, DataCamp is best in category for covering the programming fundamentals and R-specific topics, which is reflected in its average rating of 4.29/5 stars over 14 reviews.

Introduction to R by DataCamp

Intermediate R by DataCamp

Intermediate R – Practice by DataCamp

Writing Functions in R by DataCamp


Table of Contents

  1. Why You Should Trust Us
  2. About Class Central Career Guides
  3. About the Data Science Career Guide
  4. Intro to Programming vs. Intro to Computer Science
  5. How We Picked Courses to Consider
  6. How We Tested
  7. Our Pick
  8. What Others Say
  9. Another Great Python Choice
  10. Why #1 Over #2
  11. If You Are Set On R
  12. The Competition
  13. Wrapping It Up
  14. Author Bio

Why You Should Trust Us

Coming from a no code background, I started creating my own data science master’s degree using online courses almost a year ago. I scoured the introduction to programming landscape and have taken a few courses, and I have audited portions of many. I know the options and what content is needed for those targeting a data analyst or data scientist role. I also spent 20+ hours trying to find every single online introduction to programming course offered as of August 2016, extracting key bits of information from their syllabi and reviews, and compiling their ratings.

Class Central Home Page

Dhawal Shah, the founder and continuing builder of Class Central, has kept the closest eye on online courses, arguably, of anyone in the world since 2011. The Class Central database has thousands of course ratings and reviews, and the homepages of most courses have hundreds to thousands more.

About Class Central Career Guides

Class Central Career Guides are recommendations for the best online courses and MOOCs.  

Class Central Career Guides are recommendations for the best online courses and MOOCs. They have one goal: to enable you to quickly figure out which courses can help you learn new skills and advance your career. Our editorial picks are thoroughly researched using reviews written by Class Central users, as well as data from other sources and our own subjective analysis.

These guides are updated frequently to always reflect the best in online education.

Drop us a note at [email protected] if you have any feedback or requests for particular career guides — it will help us prioritize. Also, reach out to us if you want to help us create more of these career guides. We are looking for contributors!

About the Data Science Career Guide

Class Central’s Data Science Career Guide is a six-piece series that recommends the best MOOCs for launching yourself into the data science industry. The first five pieces recommend the best courses for several data science core competencies (programming, statistics, the data science process, data visualization, and machine learning). The final piece is a summary of those courses and the best MOOCs for other key topics such as data wrangling, databases, and even software engineering.

Here are the parts of the series that have been published so far:

  1. The Best Intro to Programming Courses for Data Science (this one)
  2. The Best Statistics & Probability Courses for Data Science 
  3. The Best Intro to Data Science Courses
  4. The Best Data Visualization Courses

P.S. If you are looking for a complete list of Data Science MOOCs, you can find them on Class Central’s Data Science and Big Data subject page.

Intro to Programming vs. Intro to Computer Science

Programming is not computer science and vice versa. There is a difference of which beginners may not be acutely aware. Borrowing this answer from Programmers Stack Exchange:

“Computer science is the study of what computers [can] do; programming is the practice of making computers do things.” 

The course we are looking for introduces programming and optionally touches on relevant aspects of computer science that would benefit a new programmer in terms of awareness. Many of the courses considered, you’ll notice, do indeed have a computer science portion. None of the courses, however, are strictly computer science courses, which is why something like Harvard’s CS50x on edX is excluded. Most entering the data field won’t need detailed computation theory and topics like computer networking. This guide is focused on the practical skills that the vast majority of data scientists use.

How We Picked Courses to Consider

Each course must fit four criteria:

  • It introduces programming and, optionally, computer science. See above.
  • The language of instruction is Python or R. These are by far the two most popular programming languages used in data science.
  • It must be an interactive online course, so no books or text-based tutorials. Regarding the latter, Codecademy’s video-less and text editor-based courses would qualify, but strict text tutorials like the ones from R tutorial would not. Though books are viable ways to learn programming, Python, and R, this guide focuses on courses.
  • It must be a decent length: at least ten hours in total for estimated completion.


We believe we covered every notable course that exists and which fits the above criteria. Since there are seemingly hundreds of courses on Udemy in Python and R, we chose to consider the most reviewed and highest rated ones only. There is a chance we missed something, however. Please let us know if you think that is the case.

How We Tested

We compiled average rating and number of reviews from Class Central and other review sites to calculate a weighted average rating for each course. If a series had multiple courses, like Rice University’s Part 1 and Part 2, the weighted average rating across all courses was calculated. We also read text reviews and used this feedback to supplement the numerical ratings.

A subjective syllabus judgment was made — see the “why you should trust us” section. We were looking for three main characteristics:

  1. Coverage of the fundamentals of programming.
  2. Coverage of more advanced, but useful, topics in programming. (E.g. several courses choose to not cover object-oriented programming. We believe this is a key topic, though not a deal-breaker, hence these courses only being docked marks and not excluded from consideration.)
  3. How much of the syllabus is relevant to data science?

Our Pick

Learn to Program: The Fundamentals” (LTP1) and “Learn to Program: Crafting Quality Code” (LPT2) from the University of Toronto (via Coursera) introduces the fundamental building blocks of programming using Python. We believe it has the best combination of high ratings (second-highest weighted average rating of 4.81/5 stars across 284 reviews), coverage of the fundamentals of programming, coverage of more advanced programming topics, and scope applicability to data science. The reviews are consistently stellar. We believe every bit of the curriculum is useful for those continuing on to data analysis or data science, which cannot be said for our number two pick.

Jennifer Campbell and Paul Gries, two associate professors in the University of Toronto’s department of computer science (which is regarded as one of the best in the world) teach the series. The self-paced, self-contained Coursera courses match the material in their book, “Practical Programming: An Introduction to Computer Science Using Python 3.” LTP1 covers 40–50% of the book and LTP2 covers another 40%. The 10–20% not covered is not particularly useful for data science, which helped their case for being our pick.

Jennifer Campbell and Paul Gries

The professors kindly and promptly sent me detailed course syllabi upon request, which were difficult to find online prior to the course’s official restart in September.

Learn to Program: The Fundamentals (LTP1)

Timeline: 7 weeks

Estimated time commitment: 6–8 hours per week

This course provides an introduction to computer programming intended for people with no programming experience. It covers the basics of programming in Python including elementary data types (numeric types, strings, lists, dictionaries, and files), control flow, functions, objects, methods, fields, and mutability.


  1. Installing Python, IDLE, mathematical expressions, variables, assignment statement, calling and defining functions, syntax, and semantic errors.
  2. Strings, input/output, function reuse, function design recipe, and docstrings.
  3. Booleans, import, namespaces, and if statements.
  4. For loops and fancy string manipulation.
  5. While loops, lists, and mutability.
  6. For loops over indices, parallel lists and strings, and files.
  7. Tuples and dictionaries.

Learn to Program: Crafting Quality Code (LTP2)

Timeline: 5 weeks

Estimated time commitment: 6-8 hours per week

You know the basics of programming in Python: elementary data types (numeric types, strings, lists, dictionaries, and files), control flow, functions, objects, methods, fields, and mutability. You need to be good at these in order to succeed in this course.

LTP: Crafting Quality Code covers the next steps: designing larger programs, testing your code so that you know it works, reading code in order to understand how efficient it is, and creating your own types.


  1. Designing algorithms: how do you decide what to do in a function body? How do you figure out what functions to write in the first place?
  2. Automated testing: doctest and unittest.
  3. Analyzing code for speed — details of searching and sorting.
  4. Creating new types: classes in Python.
  5. Functions as arguments, default parameter values, and exceptions.

Associate professor Gries also provided the following commentary on the course structure:
Each module has between about 45 minutes to a bit more than an hour of video. There are in-video quiz questions, which will bring the total time spent studying the videos to perhaps 2 hours.

These videos are generally shorter than ten minutes each. He continued:
In addition, we have one exercise (a dozen or two or so multiple choice and short-answer questions) per module, which should take an hour or two. There are three programming assignments in LTP1, each of which might take four to eight hours of work. There are two programming assignments in LTP2 of similar size.

Estimating time spent is incredibly student-dependent 

He emphasized that the estimate of 6–8 hours per week is a rough guess:
Estimating time spent is incredibly student-dependent, so please take my estimates in that context. For example, someone who knows a bit of programming, perhaps in another programming language, might take half the time of someone completely new to programming. Sometimes someone will get stuck on a concept for a couple of hours, while they might breeze through on other concepts … That’s one of the reasons the self-paced format is so appealing to us.

In total, the University of Toronto’s Learn to Program series runs an estimated 12 weeks at 6–8 hours per week, which is about standard for most online courses created by universities. If you prefer to binge-study your MOOCs, that’s 72–96 hours, which could feasibly be completed in two to three weeks, especially if you have a bit of programming experience.

What Others Say


“You will learn A LOT in this class. This is the best introductory programming class I have taken, and they don’t mess around … They go over things that other courses don’t really mention, like good documentation, how to design a program, and how the computer runs through the program and handles the memory. Truly enlightening.”

“Jennifer and Paul are both world-class professors who hit a home run with their course. They have proven that a properly architected online class is a superior form of learning. Their video lectures were understandable, efficient, and relevant, and were not overdone or too long. The exercises and quizzes were challenging and effective. Through all of this they bridged the cyber world and physical world by making you feel as though you were sitting right in their office and they were giving you personal instruction in programming.”

“This class was excellent. It had a good emphasis on understanding and was one of the few courses that claimed to be suitable for complete beginners that actually was. Everything was explained so patiently and in lots of detail.”

“I found that 6–10 minutes lectures are easier to stomach than those gargantuan two–hour lectures on edX … The professors were very active on the forum and would answer questions, provide clarifications, and respond to feedback.”

“If you have never done Python programming or programming at all, this is a great introductory course. Even if you have done some basic programming you may still pick up a few tips. Well worth the time.”

Read all reviews for LPT1 on Class Central


“I took Learn to To Program: The Fundamentals with Jennifer and Paul, and was glad to take this one. Great experience, great teachers, great job!”

“Excellent beginner course highly recommend to anybody with no prior experience in programming.”

Read all reviews for LPT2 on Class Central

Another Great Python Choice

The courses and the instructors are regarded as fun, quirky, organized, and exceptionally delivered. 

If the Learn to Program series doesn’t catch your eye, our #2 pick is Rice University’s “An Introduction to Interactive Programming in Python” (Part 1 and Part 2) on Coursera. It has an insane weighted average rating of 4.93/5 stars across over 6,000 reviews (!). The courses and the instructors (John Greiner, Stephen Wong, Scott Rixner, and Joe Warren) are regarded as fun, quirky, organized, and exceptionally delivered (the latter for the courses, obviously). The materials are self-paced and free, and a paid certificate is available. The course must be purchased for $79 (USD) for access to graded materials.


The condensed course description and full syllabus are as follows:

“This two-part course is designed to help students with very little or no computing background learn the basics of building simple interactive applications … To make learning Python easy, we have developed a new browser-based programming environment that makes developing interactive applications in Python simple. These applications will involve windows whose contents are graphical and respond to buttons, the keyboard, and the mouse.

Recommended background: A knowledge of high school mathematics is required. While the class is designed for students with no prior programming experience, some beginning programmers have viewed the class as being fast-paced. For students interested in some light preparation prior to the start of class, we recommend a self-paced Python learning site such as codecademy.com.

Part 1

Timeline: 5 weeks

Estimated time commitment: 7–10 hours per week

Week 0 — statements, expressions, variables 
Understand the structure of this class, and explore Python as a calculator.

Week 1 — functions, logic, conditionals
Learn the basic constructs of Python programming, and create a program that plays a variant of Rock-Paper-Scissors.

Week 2 — event-driven programming, local/global variables
Learn the basics of event-driven programming, understand the difference between local and global variables, and create an interactive program that plays a simple guessing game.

Week 3 — canvas, drawing, timers
Create a canvas in Python, learn how to draw on the canvas, and create a digital stopwatch.

Week 4 — lists, keyboard input, the basics of modeling motion
Learn the basics of lists in Python, model moving objects in Python, and recreate the classic arcade game “Pong.”

Part 2

Week 5 — mouse input, list methods, dictionaries
Read mouse input, learn about list methods and dictionaries, and draw images.

Week 6 — classes and object-oriented programming
Learn the basics of object-oriented programming in Python using classes, and work with tiled images.

Week 7 — basic game physics, sprites
Understand the math of acceleration and friction, work with sprites, and add sound to your game.

Week 8 — sets and animation
Learn about sets in Python, compute collisions between sprites, and animate sprites.

Why #1 Over #2

Despite its incredible popularity, Rice’s offering doesn’t capture our subjective testing criteria as well as the University of Toronto series — specifically criterion #1 and #3, as explained below.

1. Coverage of the fundamentals of programming.

  • Several reviews note that the fundamentals aren’t covered enough in the Rice course. The course description itself mentions that the course can be difficult for complete beginners.

3. How much of the syllabus is relevant to data science.

  • The syllabus has a notable skew towards designing games and interactive applications. Event-driven programming, drawing on canvases, motion modeling, game physics, and animation, all of which are core lessons in Rice’s course, don’t need to be in a data scientist’s toolbox.

Here are some reviews that voice our concerns, and justify Learn to Program being our #1 pick.

On the Rice series:

“Because the assignments are games, I felt the coding topics we learned were geared towards visual games — thus, quite a bit about drawing objects on the screen and making them move around. As I was not interested in using Python for visual apps (though interesting for exercises), I would have preferred to spend more time on other concepts.”

On the University of Toronto series:

“Took this simultaneously (sort of) with the Interactive Python class (Coursera — Rice University). Both classes were great. [Learn to Program] truly started at the beginning, and the instructors were wonderful. I WILL take the follow-up course they are offering next year.”

“I also took Introduction to Interactive Programming via @Coursera @ Rice. This Toronto class is a little bit better for absolute beginners and focuses a little bit more on fundamentals, like the title suggests. If you were going to take both classes, I would take this Fundamentals class [from Toronto] first as the Rice class can have a big workload for beginners who don’t have these fundamentals.”

“I took the RICE Python games programming course at the same time and may have found it more challenging if the basics weren’t covered here first.”

If You Are Set On R

The debate between choosing Python or R as your language of choice for data science is heated (exhibits A, B, and C). We won’t answer that question here.

We believe the best approach to learning programming for data science using online courses is to do it first through Python. Why? There is a lack of MOOC options that teach core programming principles and use R as the language of instruction. We found six such R courses that fit our testing criteria, compared to twenty-two Python-based courses. Most of the R courses didn’t receive great ratings and failed to meet most of our subjective testing criteria.

One option stood out as worthy in particular, however. That was DataCamp’s series of R courses: “Introduction to R,” “Intermediate R,” “Intermediate R – Practice,” and “Writing Functions in R.” DataCamp’s R courses are one of two R-based introductions to programming that sufficiently covers the fundamentals of programming and more advanced programming topics in one package. They have a very respectable weighted average rating of 4.29/5 stars over 14 reviews. The first course is free. The latter three come at a price point of $25/month, but could very feasibly be completed in one month.


The series breakdown is as follows.

Introduction to R

Estimated time commitment: 4 hours


  1. Intro to basics
  2. Vectors
  3. Matrices
  4. Factors
  5. Data frames
  6. Lists

Intermediate R

Estimated time commitment: 6 hours


  1. Conditionals and control flow
  2. Loops
  3. Functions
  4. The apply family
  5. Utilities

Intermediate R — Practice

Estimated time commitment: 4 hours

This follow-up course on intermediate R does not cover new programming concepts. Instead, you will strengthen your knowledge of the topics in intermediate R with a bunch of new and fun exercises.

Writing Functions in R

Estimated time commitment: 4 hours


  1. A quick refresher
  2. When and how you should write a function
  3. Functional programming
  4. Advanced inputs and output
  5. Robust functions

Another option for R would be to take a Python-based introduction to programming course to cover the fundamentals of programming, and then pick up R syntax with an R basics course. This is what I did, but I did it with Udacity’s Data Analysis with R. It worked well for me.

You can also pick up R with our top recommendation for a statistics class, which teaches the basics of R through coding up stats problems.

The Competition

Our #1 and #2 picks had a 4.71- and 4.93-star weighted average rating over 284 and 6,069 reviews, respectively. Let’s look at the other alternatives.

Python courses (descending weighted average ratings)

R courses (descending weighted average ratings)

  • R Programming A-Z™: R For Data Science With Real Exercises! (Udemy): costs money. It doesn’t offer as much bang for your buck as our #1 R offering. Ratings are similar, considering sample size. It has a 4.7-star weighted average rating over 785 reviews.
  • Introduction to R for Data Science (Microsoft/edX): not as much depth as DataCamp’s offering. It has a 4.48-star weighted average rating over 500 reviews.
  • R Programming (Johns Hopkins University/Coursera): doesn’t sufficiently cover the basics of programming. Reviewers note that it is difficult, and not in a good way. It has a 4.04-star weighted average rating over 900+ reviews, despite a 2.5-star rating over 212 reviews on Class Central.
  • TryR (CodeSchool): it’s not long enough to fit testing criteria, and doesn’t sufficiently cover programming fundamentals. It has a 4-star weighted average rating over 260 reviews.
  • Programming with R for Data Science (Microsoft/edX): more of an introduction to the R language rather than programming. The course site states, “If you have some programming experience, and would like to learn more about R, then you’re at the right place.” It has a 3-star weighted average rating over 12 reviews.

Wrapping it Up

This is the first of a six-piece series that covers the best MOOCs for launching yourself into the data science field. The other pieces cover several other data science core competencies: statistics, data analysis, data visualization, and machine learning.

The final piece will be a summary of those courses, and the best MOOCs for other key topics such as data wrangling, databases, and even software engineering.

If you’re looking for a complete list of Data Science MOOCs, you can find them on Class Central’s Data Science and Big Data subject page.

If you have suggestions for courses I missed, let me know in the comments!

Author Bio

David Venturi

David Venturi created a personalized data science master’s curriculum for himself using MOOCs. He has a dual degree in Chemical Engineering and Economics, and especially enjoys math, stats, and coding. He’s a huge baseball and hockey fan, and writes about the latter with a focus on analytics.

Twitter Medium Web

Comments 10

  1. Muvaffak GOZAYDIN

    Fantastically good . Thanks billion Shah .
    Can you suggest an AA degree program in marketing for example .
    Then provide an AA degree in Marketing of Class-Central University . It is accredited or not it does not matter . Courses are taken from top universities in the first place .

  2. Muvaffak GOZAYDIN

    From these lists you can provide a BA degree in Computer Science of Class-Central University as well .
    Think about it . Do not reject immediately .
    CLASS-CENTRAL UNIVERSITY sounds very good .


    Could you provide a guide for courses for preparing for a Masters in Financial Engineering too? For topics like PDE,ODE,C++,Stochastic Calculus etc.

    • Muvaffak GOZAYDIN

      Please see my proposal above .
      It is easy to get selected all Financial Courses no problem .
      But problem will you get a degree at the end .

  4. Muvaffak GOZAYDIN

    Dear Shah
    This is a revolution .
    This is my dream for solution to higher education in the world .
    See my blog digital-university.blogspot.com

    Here is my proposal to you .

    1.- The Class-Central University has been set up . CCU

    2.- It is open to 7 billion people of the world .

    3.- Any high school graduate can attend and get a degree if successful .

    4.- CCU has 50 to 100 members, top universities of the world .
    Stanford, Harvard, MIT, Duke, Princeton, Cornell , Sorbone, London Imperial College
    University of Tokio , Zurich Technical University and many more .

    5.- All member universities are developing and converting their online courses same as oncampus courses .

    6.- CCU awards
    AA , BA , MA , MS Degrees in
    Computer Science
    Business Administration ( Marketing, Finance, Operations )
    Electronic Engineering
    Health Science

    7.- Students take their courses online from member universities and successful students get certificates from those member universities .

    8.- CCU awards
    AA degrees if a students gets 20 certificates
    BA degrees if a student gets 40 certificates
    MA degrees if a student gets 10 certificates
    from member universities .

    9.- CCU provides
    40 courses for selection for AA candidates
    80 courses for selection for BA candidates
    20 courses for selection for MA, MS candidates
    Students are free to select from these courses as they please like at Harvard University .

    10.- CCU provides best ID verification software contracting best software companies .

    11.- In CCU diplomas all courses taken from member universities are listed .

    12.- CCU requires only $ 100 for diploma preparations while awarding degrees .
    Otherwise CCU is all free.
    Member universities may get for ID verification a small fee of $ 100 or so .

    13.- CCU is not accredited, but all courses are from accredited universities therefore there is no need for accreditation of the CCU . All courses are listed in the diploma .

    14.- Support CCU always, everywhere for the peace of the world .

  5. Arturo Valencia

    Hey David. That was the longest recommendation I have ever read!. Thank you for that. Please consider in your list a MOOC site for the Spanish-speaking audience with the coming R course: https://miriadax.net/web/aprende-r-rstudio

  6. Ankita Singh

    Strongly agree. Data scientists are a speedily growing career that is in high demand, especially in Information technology centers. I always interested in Python, please suggest me, it’s helpful for my career?


    Great thorough list Data Science Courses.

    Undoubtedly, Data Scientists has been ranked the number one Job on Glassdoor with high salary and this list will definitely help a lot. Also, below can be checked for more short as well as free university courses on data science and python.

  8. adity

    This Data Science tutorial is ideal for those looking for a shift to Data Science domain.
    here web programming tutorial welookups.com

  9. Muvaffak GOZAYDIN

    Now go to

    Get a master degree in Data Science free.
    Take courses from Harvard, Stanford, Yale, MIT, Princeton, Columbia plus many top schools . That is a revolution Also get masters in Artificial Intelligence . Again free open to 8 billion of the world .


Leave a reply

Your email address will not be published. All comments go through moderation, so your comment won't display immediately.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Browse our catalog

Discover thousands of free online courses from top universities around the world like MIT, Stanford, and Harvard.

Browse all subjects