 Hey, what's going on everybody my name is John Hammond welcome back to their YouTube video and tutorial on this video We're just cranking out the solution and to our word fine challenge What English word meets this criteria six letters long two F's two a's one R and one vowel Let's find out we can get Python to solve this for us an interesting thing if you are on window I'm sorry if you are on Linux is really nice is that you have your own dictionary just stored on your file system It's in user shared dick words and we can totally open that up So they handle to that open it up for reading Wow, I should learn to type and We'll just grab the words out of that We'll just say handle read and I'm gonna actually split that on all new lines I could do this with the read lines function, but it gets a little hefty It gets a good season issue with some new line characters in there So it doesn't matter to me now. I've got all the words now Let's actually begin to loop through them and try to find something that matches this criteria We can do four word in words and we'll just crank through this this criteria We have here has to be six letters long. So if length of word It's not equal to six. We can continue if See what else? No, let's remove those Contains two F's so word dot count of F Actually, we're gonna have to make all this lowercase, right? Just so we can test with it real easy. So word equals word dot lower and now all lowercase F's Is not equal to two Because we have to have two F's We will continue Do the same thing for a and one for R just be one there and And One of their vowel. We don't really have to probably shouldn't have to supply criteria for that I think this will narrow it down for us. All right, so if we didn't continue with that loop we can just print out the word that we have right now and This is our function solve. So let's go ahead and run our solve function. I'm trying to run this and boom What English word meets this criteria six letters long contains two F's two a's one R and one of their vowel Looks like we've got three words a fair a fray and raffia Looks like all of these meet the criteria six letters long Two F's two a's one R and one other vowel I look even looks like this I being the one other vowel for a fair work Why if you want to consider that one other vowel another one I for raffia raffia, whatever I don't know. I don't know English But that's it super easy, right? All we did was loop through the dictionary try to find values that we wanted made sure it met that criteria and just avoided things that didn't Super easy, right? There it is. There's our solutions in the book that I'm looking at a fair is the only one that they considered But with our program we actually found two other solutions that seem like they work. So hey good stuff Thanks for watching guys. Hope you enjoyed this and I hope your solutions if you came up with them We're pretty gosh darn similar. Thanks again guys. Adios