### Learn With Me | Intro To Elixir Lesson Sixteen - Case Homework

##### Transcript

English (Auto-generated)

Oh we're back today with another cast from the learn elixir with me series. Um And I just finished doing the lesson 16 lesson. Um So I'm gonna go ahead and do the homework for that now so we can figure it out together. So the homework says Use the exercise from less than 14 most recurring letter in a string. And then add use case to return whether the most recurring letters of Vowel or not. No. Using case is likely not the optimal solution and use it for the sake of practice. Alright so less than 14. Uh Yeah so copy this over and created a homework dot E. X. File here. Perfect. I'm gonna get rid of that. So this is our current solution here. So let's just refresh our memory by seeing what it prints out. Mhm. Cd into lesson 16 and then we'll do homework or publix or homework. Doggy X. It's the perfect two prints out to people with the letter and then the amount of times it's been repeated. Alright so here let's add in, we're gonna have another pipe operator now that we have the solution, what's that case do? And then we're gonna take a letter and numb and I want to take both since because even though we're just gonna be checking the letter we want to print out still the solution because that was part of what we're wanting to do. So let's find out ah and we'll give it a K. A. Guard here. So we'll say when letter equal to. Mhm mm hmm let's just do one at a time for the sake of getting used to case um We could probably find a way to condense it. Um But let's just use them all as individual cases here. So letters people to a um we will do produced string the letter and then we'll present the letter piers, we will print out the num times and it is a vowel. So let's go ahead and copy this down. E I O U E O. So I forgot I E I O U. And then we'll do one that has a letter and numb one. Thanks. The letter is equal to No we don't need to guard. Sorry just takes whatever it is. If it didn't pass any of those and it's gonna say exactly this one letter. Sure. And it is not a vowel. Um And then we can also just if we want to have a safety one where we don't have anything and then we can just say something went wrong but we don't need it for this. Let's go ahead and run this. Um with the ones we have here. We're gonna we should get is not a bowel twice. Yeah it's not a bowel. So let's do, could you, I was there. So Isabel is not a vowel. A is like crazy. Perfect. So that's exactly what we wanted there. There's three times seven times and it's not a vowel. So that's exactly what we want. Um Like I said there's probably a way that we can simplify this into a single line, but I'm not gonna worry about it for the sake of this challenge, because we were just wanting to get used of using case and how we're using it here is working out correctly for us, so um stationed with me for the next lesson.
37 Views 1 Likes 0 Comments

In this homework, we expand the lesson we went over in lesson 14 and add a case to it.