Introduction to Programming in Python with GitHub Copilot

An introduction to programming that prepares students to author software in cooperation with an AI Assistant.

Course Description

Emphasis on a broader range of programming skills than a classic introductory course (includes prompting and working with GenAI, testing, debugging, problem decomposition, using GenAI to help understand code, and more emphasis on code reading than code writing from scratch).  These skills empower students to write software with the aid of GitHub Copilot.  The majority of these skills are assessed on homeworks and in proctored exams without the aid of GenAI.  Students also create large software projects with the aid of GenAI in three key programming domains: data science, image processing, and games (these projects are much larger than what we used to assign prior to GenAI).

Prerequisites:  None

Course Language:  Python as well as interacting with GenAI programming tools

Book for the course: Learn AI-Assisted Python Programming with GitHub Copilot and ChatGPT

What students will learn

Course Topics: Variables, Conditionals, Loops, Functions, Files, Lists, Dictionaries

Skills: Code Tracing, Code Explaining, Code Testing, Code Writing, Code Debugging, Problem Decomposition, Top-down design, Effective use of Copilot

Accessing the Course

Link to Public Materials (slides and projects)Course Syllabus

Creators:  Leo Porter, Dan Zingaro

Based on slides/materials from: Christine Alvarado, Mark Guzdial, and Beth Simon

License: CC BY-NC-SA 4.0

Research publications about the course:

Our experience report describes the course design philosophy, the course itself, and student experiences in the course.  Key findings include that students appreciate the integration of GenAI in the course while also having concerns about overreliance on the GenAI tools.

Vadaparty, Zingaro, Smith, Padala, Alvarado, Benario, and Porter. 2024. CS1-LLM: Integrating LLMs into CS1 Instruction. In Proceedings of the 2024 Conference on Innovation and Technology in Computer Science Education V. 1 (ITiCSE 2024).

Popular press articles about the course:

An article in the Conversation describes our new introductory programming course that uses AI assistants like GitHub Copilot to help students bypass low-level syntax issues and focus on higher-level problem-solving skills such as problem decomposition and testing. This approach aims to better prepare students for the current professional programming environment where AI tools are common and allows them to tackle more complex projects earlier in their learning.

This article in IEEE Spectrum expands on our course with an emphasis on why we have shifted away from syntax in our course, to focus instead on problem solving with code.

In December of 2024, the course designers gave a talk at the Raspberry Pi Foundation about integrating GenAI into introductory programming.  It highlights the importance of adapting assessments and addressing challenges to prepare students for a future where AI  is integral to programming.  You can either watch the video or read the blog about the talk.

Units

The total course is designed for a 10-week quarter. Course includes two 80 minute lectures weekly and one 50 minute lab weekly.  Materials may be adapted to other schedules.

Unit 1: Foundational concepts

Unit 1 introduces students to core programming features, including variables, conditionals, loops, strings, and lists. This unit also introduces memory models, using debuggers to reason about program behavior, and using Copilot for code generation.

  • Unit 1 Module 1: Introduction to the course and how to succeed
  • Unit 1 Module 2: Variables, functions, and how to test
  • Unit 1 Module 3: Conditionals, memory models, and strings
  • Unit 1 Module 4: Loops and working with a debugger

Unit 2: Data Science

Unit 2 revisits these programming ideas in the context of data science while introducing students to working with files, dictionaries, and tuples.  Testing is revisited in the context of working with files and large datasets.  We introduce students to problem decomposition and the workflow of generating multiple functions with the aid of GenAI.

  • Unit 2 Module 1: Introduction to files (including csvs) and data science
  • Unit 2 Module 2: Dictionaries and tuples
  • Unit 2 Module 3: Testing when working with files
  • Unit 2 Module 4: Problem decomposition and designing programs with the help of GenAI

Unit 3: Images

Unit 3 revisits the programming ideas from Unit 1 in the context of image manipulation.  Students gain experience working with nested loops to iterate over images and passing objects between functions while being introduced to PIL python library.  

  • Unit 3 Module 1: Introduction to images in python and project expectations
  • Unit 3 Module 2: Image filters of increasing complexity and testing filters
  • Unit 3 Module 3: Problem decomposition for image projects

Unit 4: Games

Unit 4 also revisits the programming ideas from Unit 1, now in the context of game design.  Students gain experience working with user input, using randomness, and game execution loops. 

  • Unit 4 Module 1: Game cycle and project expectations
  • Unit 4 Module 2: Full game example including debugging and handling incorrect responses from ChatGPT