 Now, with exercise five, we're going to take the next step in building out our structure from the top down. Specifically, we're going to look at our ANN methods, train and evaluate, and give them just a little more form. We know that they're both going to do almost exactly the same thing, so what we do in one will be able to copy and use for the other for now. They bring in a data set, and then they iterate through it. In the train case, it iterates through and trains on each one, and in the evaluate case, it iterates through and uses it to evaluate the neural network's performance on each one. But for now, we're just going to set up the iteration loop and cycle through them. To set this up in our ANN class, we'll start by defining some class-level attributes, the number of iterations to train, and the number of iterations to evaluate on. It helps to cast these as integers, so the little int parentheses takes that number, make sure it's an integer, so that we can use the range keyword on it later and count through all of the integers up there. We're setting a fairly large number for training here, 100 million, a million to evaluate. These are numbers that will change later. We can go now into the train method and iterate through each one of these 100 million iterations. For each one, we get the next example from our training set. This will be a two-dimensional array, and so before we can feed it into a neural network, the first thing we need to do is flatten it out. Just turn it into a long one-dimensional array. Ravel is the keyword that does that. So when we're all done, we have these inputs, x. In this case, it'll be an array of four numbers, or four pixel values from our example, and we can print that out to see what's going on. And then we can do something almost exactly the same for the evaluate function. Now, we are at a sweet spot. We have something that produces a visible result, so we can run it and make sure that at least so far, we haven't introduced any hidden bugs. Anything that gums up the works. When we run it, we see, sure enough, we get an endless stream, nearly endless stream of these examples that are flattened into arrays of four numbers, and taken at random from our set of examples. So, so far, everything's looking really good.