Create a Python Wordle Clone With Rich (Overview)

In this video course, you’ll build your own Wordle clone for the terminal. Since Josh Wardle launched Wordle in October 2021, millions of people have played it. While you can play the original game on the Web, you’ll create your version as a command-line application and then use the Rich library to make it look good.

As you follow along in this step-by-step project, you’ll practice how to set up a simple prototype game before iteratively developing it into a solid application.

In this video course, you’ll learn how to:

  • Build out a command-line application from a prototype to a polished game
  • Read and validate user input
  • Use Rich’s console to create an attractive user interface in the terminal
  • Organize your code into functions
  • Provide your users with actionable feedback

You’ll create Wyrdl, your own Wordle clone in Python. This project is for anyone getting comfortable with Python who wants to build a terminal application from the ground up. Throughout the course, you’ll build your code step-by-step while focusing on having a game that you can play from the start.

Along the way, you’ll be reading input from the user at the terminal, using if statements, repeating actions with for and while loops, organizing data in structures like lists and dictionaries, and encapsulating code with functions.

You’ll see code running in bpython on-screen, but you can also use the standard REPL.

Download

Sample Code (.zip)

9.2 KB
Download

Course Slides (.pdf)

12.4 MB

00:00 Create a Python Wordle Clone With Rich. In this course, you’ll build your own Wordle clone for the terminal. Since Wordle was launched in October 2021, millions of people have played it.

00:12 While you can play the original game on the Web, you’ll create your version as a command-line application and then use the Rich library to make it look good. As you follow along in this step-by-step course, you’ll practice how to set up a simple prototype game before iteratively developing it into a solid application.

00:30 You’ll learn how to build out a command-line application from a prototype to a polished game, read and validate user input, organize your code into functions, provide your users with actionable feedback, and use Rich’s console to create an attractive user interface in the terminal.

00:49 This project is for anyone getting comfortable with Python who wants to build a terminal application from the ground up. Throughout the course, you’ll build your code step by step while focusing on having a game that you can play from the very start.

01:03 Don’t forget to download the course materials included, as part of them is the code at the end of each major section of the course, which will allow you to compare your code and fix any issues that may crop up along the way.

01:16 Any code that you see running in the REPL will be using the bpython interpreter. This is a replacement Python interpreter that offers a number of enhancements, including code highlighting and suggestions, but any code you see running on-screen will work in the standard Python REPL, which is typically accessed by typing python or python3 at your terminal or command-line prompt. While working through the steps, it’s helpful if you’re comfortable with the following concepts: reading input from the user at the terminal, using if statements to check different conditions, repeating actions with for and while loops, organizing data in structures such as lists and dictionaries, and encapsulating code with functions.

01:58 If you are not confident in your knowledge of these concepts, then that’s okay. Going through this course will help you practice them. If you get stuck, Real Python has you covered with resources that will get you back on track.

02:11 So now you know what’s going to be covered, let’s get started by taking a look at what you’ll be building.

Become a Member to join the conversation.