python-course.eu

1. Wordle

Wordle is a word game, which recently got very popular and was added to NYT Games website. It is developed by Josh Wardle. You can find the original game here: https://www.nytimes.com/games/wordle/index.html .However, you can only play it once a day.

Luckily, in this version of Wordle that you are going to be programming, you will be able to play as many times as you want in a day. Moreover, you will be allowed to see which words could potentially be the right answer. What is more, you will be using a bigger data set than the actual Wordle, which basically involves all the 5 letter words in a Scrabble dictionary.

Let’s go through the rules:

Live Python training

instructor-led training course

Enjoying this page? We offer live Python training courses covering the content of this site.

See our Python training courses

See our Machine Learning with Python training courses

To do:

Tips:

from random import randint,seed 

seed()

Live Python training

instructor-led training course

Enjoying this page? We offer live Python training courses covering the content of this site.

Upcoming online Courses

Python Intensive Course

10 Mar to 14 Mar 2025
07 Apr to 11 Apr 2025
23 Jun to 27 Jun 2025
28 Jul to 01 Aug 2025

Efficient Data Analysis with Pandas

10 Mar to 11 Mar 2025
07 Apr to 08 Apr 2025
02 Jun to 03 Jun 2025
23 Jun to 24 Jun 2025
28 Jul to 29 Jul 2025

Python Text Processing Course

09 Apr to 11 Apr 2025
04 Jun to 06 Jun 2025

Python and Machine Learning Course

10 Mar to 14 Mar 2025
07 Apr to 11 Apr 2025
02 Jun to 06 Jun 2025
28 Jul to 01 Aug 2025

Machine Learning from Data Preparation to Deep Learning

10 Mar to 14 Mar 2025
07 Apr to 11 Apr 2025
02 Jun to 06 Jun 2025
28 Jul to 01 Aug 2025

See our Python training courses

See our Machine Learning with Python training courses

Test:

If the word to be guessed is ‘BUIST’ and if I guess first ‘MILKY’, my cluster of potential words should consist of 1127 words. If I then go ahead and guess ‘POUND’, my cluster of potential words should consist of only 52 words. If I go ahead and guess ‘RATES’, my cluster should consist of only 3 words and they should be ['BUIST', 'BUSTI', 'QUIST'].

Useful built-in functions to keep in mind:

Live Python training

instructor-led training course

Enjoying this page? We offer live Python training courses covering the content of this site.

See our Python training courses

See our Machine Learning with Python training courses

What you definitely need to know to complete this exercise:

Food for thought:

Live Python training

instructor-led training course

Enjoying this page? We offer live Python training courses covering the content of this site.

See our Python training courses

See our Machine Learning with Python training courses

In case you are interested in information theory:

Here are two videos on Wordle and information theory by 3Blue1Brown.

The word list

Live Python training

instructor-led training course

Enjoying this page? We offer live Python training courses covering the content of this site.

Upcoming online Courses

Python Intensive Course

10 Mar to 14 Mar 2025
07 Apr to 11 Apr 2025
23 Jun to 27 Jun 2025
28 Jul to 01 Aug 2025

Efficient Data Analysis with Pandas

10 Mar to 11 Mar 2025
07 Apr to 08 Apr 2025
02 Jun to 03 Jun 2025
23 Jun to 24 Jun 2025
28 Jul to 29 Jul 2025

Python Text Processing Course

09 Apr to 11 Apr 2025
04 Jun to 06 Jun 2025

Python and Machine Learning Course

10 Mar to 14 Mar 2025
07 Apr to 11 Apr 2025
02 Jun to 06 Jun 2025
28 Jul to 01 Aug 2025

Machine Learning from Data Preparation to Deep Learning

10 Mar to 14 Mar 2025
07 Apr to 11 Apr 2025
02 Jun to 06 Jun 2025
28 Jul to 01 Aug 2025

See our Python training courses

See our Machine Learning with Python training courses