How to Program Connect 4 in Python! (part 1) -  Basic Structure & Game Loop @KeithGalli
How to Program Connect 4 in Python! (part 1) -  Basic Structure & Game Loop  @KeithGalli
Uploaded December 2017 | Updated November 2026, 3 hours ago
This is the first part of a few part series on how to program connect 4 in python 3 and pygame. In this video I show you how to store the board state, and build a simple command line interface for dropping pieces. The next video will show you how to write a function to check for wins. Then after that the final video will build graphics for your game.

Part 2:
youtube.com/watch?v=zD-Xuu_Jpe4&t=325s

Full Game Source Code:
github.com/KeithGalli/Connect4-Python

INSTALLATION LINKS:

Link to setup Python 3 and Sublime text:
youtube.com/watch?v=2nQNsrhaMpA

Link to setup SublimeREPL:
packagecontrol.io/packages/SublimeREPL

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PYTHON TUTORIAL SERIES:

Why Learn Python? +Setup: youtu.be/RJL6Y761TNE

1. Math & Variables: youtu.be/XM0CtrJYM2A
2. Conditional Statements (if, elif, else): youtu.be/vsVGPcfxEiA
3. Functions: youtu.be/5U95tRdYySA
4. Lists & Tuples: youtu.be/_zFI6ytHHdY
5. For Loops & While Loops: youtu.be/WPF5M_Ic6Fc

Learn to Program a game: youtu.be/-8n91btt5d8

-------------------------
Follow me on social media!
Instagram | instagram.com/keithgalli
Twitter | twitter.com/keithgalli

-------------------------
If you are curious to learn how I make my tutorials, check out this video: youtu.be/LEO4igyXbLs

Learn data skills with hands-on exercises & tutorials at Datacamp!
datacamp.pxf.io/c/3588040/1012793/13294

*I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.
How to Program Connect 4 in Python! (part 1) -  Basic Structure & Game LoopHow to Generate an Analytics Report (pdf) in Python!Python Data Science Project Ideas! (for all skill levels)Keith Galli Live StreamGenerating Mock Data with Python! (NumPy, Pandas, & Datetime Libraries)Programming More Trees in Python! (Recursion & Artwork)Pre-Flop Probabilities, Tips, & Tricks - How to win at PokerProgramming Trees in Python! (with the turtle graphics library)For Loops & While Loops in Python - Beginner Python Tutorial #5 (with Exercises)Quickest Ways to Win at Connect 4!Math & Variables in Python - Beginner Python Tutorial #1How to Prepare for a Programming Interview! (Tips & Tricks)
Keith Galli |

How to Program Connect 4 in Python! (part 1) - Basic Structure & Game Loop

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER