This week, it's time to look at the letters game which requires a slightly different approach!
RULES - Countdown Letters Game
Letter tiles are arranged face-down in two piles; one all consonants, the other vowels.
The contestant picks a pile, and a letter picks either a consonant or vowel which is revealed as the top tile from that pile and this is then placed on the board. It should be noted that letters are selected one by one (and knowing what has already been selected beforehand and this is very different from the way that the numbers are chosen in the numbers game)
A selection of nine tiles is generated in this way, and must contain at least three vowels and four consonants
The Vowel breakdown is shown below
| || |
The method of appending to a new list and removing a choice from the initial list is the same as in the numbers version of the game:
One thing that I chose to do was to capitalize every letter variable before it is appended to the list (in retrospect, it would have been easier to make all the letters capitals in the two initial lists we make the random choice from but I did not consider this when I initially created the Vowel and Consonant lists!)
We could just print out the list that we have created [letterslist] but I prefer a much neater alternative of converting the list into a string and then removing the square brackets, the quote marks and also the commas that separate all the items in the list (and then printing it)
An extension would be to check the numbers of vowels and consonants ( at least three vowels and four consonants) before progressing to the 30 second countdown.
For other coding and teaching ideas click here