Introduction

What's the word?
What's the word?
240ffac20f87

 Word games in general are to relax your brain at work or in school, whilst still broadening your mind and vocabulary. An example of a word game that has taken the world by storm is “Wordle”, a web-based word game created and developed by Welsh software engineer Josh Wardle, and owned and published by The  New York TImes Compagny since 2022.

We will show you that coding a word games with Python is possible and easy!

Task



 

Your task is to create a word game that emulates Wordle, in the sense that the user has to guess letters from the alphabet, in order to guess the secret word.

You can also develop your coding skills by creating this game with Python and maybe also develop your vocabulary.

Process

 

Introduction : 

Discussion group : Do you think game is effective in developing new skills?And why?

Each participant can use sticky note to write their ideas.

Read the article "10 benefits of playing word games" as a basis for the discussion.

Before starting the exercise, you can watch the first video "Solving Wordle in under 3 guesses with python"

Code your own word guessing game in Python

Your code should…

  • Ask the user to either enter a letter or the whole word.
  • If they guess the whole word correctly, they will win and the game will end
  • If they guess a letter correctly, the user will be informed of the position of the letter within the secret word
  • This code will repeat, until the user runs out of lives or until the user eventually guesses the whole word

Follow the step by step instructions that you can find under Documents in resources. 

You can also use the video and the article that you can find in resources.

 

Conclusion

You are now able to create your own guessing game in Python! 

Now you know that anyone can create a basic video game with Python.

Indeed, young people can urderstand that coding a word game with Python even if they don't have any experience in coding.

 If you want to go further, you can watch the second video "Solving Wordle in under 3 guesses with python" in resources.

Next step :

Practice, Practice and Practice!

Continue to learn about coding with Python. You can test the other modules to  feel more comfortable with it.

Learning Objectives

  • You should be able to be confident in the use of basic lists to store a collection of words or characters and how to randomly and intentionally access different elements of lists in a game context.
  • You should be able to be confident in declaring and calling subroutines with parameters and arguments.
  • You should be able to to fluently write if statements and while loops and understanding the different conditions that these forms of selection and iteration are determined by.

Resources

Click each section below to see all resources available.