Vowel?
snap lets you manipulate a variety of data types. You have already used blocks like letter
, join
, and join words
to manipulate strings of characters such as "New York" or "Another hour has passed". You have also manipulated numbers.
This page introduces a new data type, lists. In Unit 3, you will study lists in depth.
if
statements in vowel?
, you can make a list of vowels and then test to see if a particular letter is in that list. snap makes that a snap!
list
block in the variables palette. Click on the to make a space for each letter you need to add.
vowel?
using list
and contains
.vowel?
. With your pair programmer, figure out how each works. Decide which you find clearer.map
.join "a" or "an" with
block on the words in that list. Here are two ways to perform that test.