Ready to begin
No records have been processed. Start with Next step.
![explode("specially") produces [s,p,e,c,i,a,l,l,y]. A word can be one string or a list of characters, depending on the operation.](/images/computational-thinking/week-5/explode-word.png)
Follow one occurrence at a time. Choose another input to test empty lists, repeated IDs and different parameters.
Ready
No records have been processed. Start with Next step.
Predict the next change, then step through the list. The original course records remain unchanged.
A word stored as one field can be unpacked with explode into a character sequence. explode("It") gives ["I","t"]. You can now use foreach, first, rest, last and init on the characters just as you did on student IDs.
Representations have levels. ["Monday","school"] contains two word strings. explode("Monday") contains six characters. A list of words is different from one flattened character list. Choose the representation that retains the information your question needs.
In this explorer, explode preserves case and punctuation. explode("eyes.") includes the final dot, while the alphabetic letter count is 4. A hyphen in fire-eyed is a character too. If a task wants only letters, make that cleaning step explicit rather than silently changing explode.
What is length(explode("It"))?
2: the characters I and t.
Does explode automatically lowercase a word?
No in this lesson. Case is preserved. The palindrome lesson explicitly lowercases its input as a separate convention.
Why can stored LetterCount differ from character-list length?
Punctuation or hyphens can be present in the string but excluded from a letter count. State which characters you count.