[MUSIC] All right, so here we have let number of moons equal moonsArray.count. And again we get moonsArray from the optional binding. We can say now if numberOfMoons, which we just got, is greater than 0 then let's create the moonsArray for that planet. So var moonsList equals an empty string. I'm going to initialize that variable called moonsList, so that I have some space to add my normal english sentence list into as a string. Then inside of this for loop which we're doing over the different planet dictionaries in our planets array, I'm going to say for every moon in that planets moonsArray then give me the name of that moon and add it to a nice proper English list. So for var i = 0, as long as i is less than the number of moons in that array then increment i. And I'll say let moon equal the moon and the moonsArray at the current index i and force that to be a String. If i is equal to zero, in other words, if it's the first i in the moon, just add a space and the word moon, because we're going to, later, here, say The planet, space the name of the planet, has, space, some numberOfMoons, and the planet has some numberOfMoons, and they are called. And we want it to have a space before the name of the first moon up here, right? So, that's why I'm going to check if i is equal to 0. So if no, it's the first one, we put a space before the name of the moon. Otherwise, it's not the first one. So, if i is equal to moonsArray.count- 1, which would be the last moon of that array. I want to put the word Space and space before the name of the moon. Otherwise we're just some moon in-between the first and the last one, so we can use comma space, right, to make it a nice English list. So I say moonsList plus equals comma space plus the name of the moon, right, which is the moon variable. Okay, so now that I'm done going over the list of moons and turning those into nice, properly formatted English lists, I want to go and actually create that string that I'm going to print out with that information. So, I say, var infoString of type String. And we'll say if numberOfMoons == 1 then InfoString = The planet so and so has such and such number of moons. But there's only one moon in this case right, so I want to say the planet blank has one moon, right? It is called whatever the name of that moon is. Otherwise, there's more than one moon, so I say, the planet blank has x and x many moons, with an S. And they are called whatever our moons list string contains. So now, if I print out the info string, which I do on this line here, we can start to see what we get. Keep in mind that this is all inside of one big for loop which goes over all of the planets in our planets array. If we don't have any moons, then we fall into the case that the numberOfMoons is not equal to 0, right? So, I can select that first if case and see what follows it is an else. So we have, we don't have any moons, right? The number of moons is not greater than zero, so we can just say the planet blank has should say zero moons. Lastly, if we don't have any information about the moons, we also want to take care of that case. So we can say, see what the alternative of that was by double clicking on this parentheses. We checked if we had valid values that these different key valued pairs in the dictionary. So if we didn't have valid values then, let's see if we have, first of all the name of the planet, so we can tell you which planet we don't have information about and display that also. Okay, so now that we've done that, we can let the for loop go, and Playground will execute that for us automatically. And we can see about the information we have in our planet's. So, let's look at the planets array that we're going to iterate over. We see mercury, venus, earth, mars, and neptune. And we see our information about each of those planets. Mercury has no moons, the planet Venus has no moons, the planet Gaia which is Earth has 1 moon, it is called Luna. The planet Mars has 2 moons, they are called Deimos and Phobos. We notice that here our function, it's just a for loop right now. But it handles singles and plurals well, and when we have a longer list, the planet Neptune has 14 moons, they are called Triton, Proteus, etc., formatted correctly with commas and spaces, and the word and at the end, just like a correct English sentence. [MUSIC].