Build Connect Four Using Python
What is a project-based course?
In this course, the project is front and center. You’ll start with the final product in mind and complete all the steps necessary to build it over three modules. You’ll build your project entirely on your own, with tips, lessons, and resources provided to help you along the way.
What will you build?
Build a fully-functional game of Connect Four! By the end of this project, you will have built your own two-player game of Connect Four that will ask users for their input, verify that the input is valid, determine if somebody has won the game, and display the board.
There are a number of concrete Python concepts that you’ll need to master to complete this project. Lists, conditionals, functions, and the input() function are probably the most essential. But beyond learning how to use those specific Python skills, this project will help you think computationally and creatively. How should you structure your data to make your life easier when trying to determine a winner? What bits of logic will you use often enough to justify making them their own function? These are examples of some of the large-scale challenges you’ll encounter during this project.
Why learn Python?
Python is a general-purpose, versatile and popular programming language. It’s great as a first language because it is concise and easy to read, and it is also a good language to have in any programmer’s stack as it can be used for everything from web development to software development and data science applications.
Codecademy courses have been taken by employees at
Connect Four Part 1: Creating The Board
Welcome! In this portion of the project, we will focus on building our Connect Four board. We'll think about how to represent the board and then how to display it to the user.
Connect Four Part 2: Interacting With The Board
In part two of our Connect Four project, we will focus on making some functions that allow the user to interact with the board.
Connect Four Part 3: Determining The Winner And Playing The Game
In Part 3 of our Connect Four project, we're going to accomplish two tasks: determining if a player has won the game, and setting up a loop to play the game until the game has ended.
— Madelyn, Pinterest“I know from first-hand experience that you can go in knowing zero, nothing, and just get a grasp on everything as you go and start building right away.”
Put your Python knowledge to the test by creating a fully interactive Connect Four game!
Earn a certificate of completion
3 hours to complete in total
Let’s build a fully interactive Connect Four game using Python!