 Hey, what's going on guys RudeLinL here bringing you back with another Python tutorial. Let's get idle fired up And let's jump right into the action. I'm gonna create a new program here I'll save this as filed up Python keep it easy as usual Get my shebang line going obviously if you're on Windows you don't have to do this But it's a good idea to do so if you are on Linux I'm gonna create a class here class base as usual to find our constructor Which is the end keyword surrounded by two brands I'm sorry to underscores on either end the self keyword gets passed just like every other function you create inside of an object And then we'll test whether or not this is the Program we are running currently at the moment We'll get our code block started up and we're creating roots objects actually a root instance of the base class Alright Check it out. Check it all out. Let's run this and Nothing happens because we've supplied the pass variable, which doesn't do anything. Okay But hey, let's take a look what we got here. Let's set up a an array or a list of numbers numbers can equal I Guess it could be a tuple. It doesn't really matter to 100 negative three maybe a 429 and then maybe a zero Okay, so we got a we got a list of self numbers so now if we print out the minimum Which is a new function here, which lets us find the minimum of The minimum value of anything that we pass to it In our case an array in our case it finds negative three because that is the smallest number here in that in that list or that Array, so let's see how that's really happened. Let's see how we can make that our own Let's give it a go. Let's let's create a new function here. Let's define Get minimum That's what I'm gonna call mine. Obviously you can call it whatever you'd like remember We have to pass in the self and then the the array All right, so First we're gonna begin to loop through the array just because looping is our friend our friend And that's everything that we do so for each element in the array We can do something with it first. We want to test whether element The current element that we're on is the first element in the array So what we do is we can use some indexing here and we can use zero Because that's the big that's the initial Elements inside an array if the element is the this is the first element in the array We can set the lowest or the minimum to element And now else if it's not we can just You just keep going we can keep looping through it and if I want to test again if the current element is less than minimum What we have so far we should reset minimum to that element minimum equals element and Then when we're done looping and everything we can just return minimum So we have successfully found the smallest number because we keep looping through it And if we find anything that is smaller than what we know about so far, we'll just will the minimum number will become that So let's try it. Let's do a print self dot get minimum and Then we can run self dot numbers here Run this at five and we still get negative three. So let's create another variable of though. Let's try a list of numbers Cuz I'm very very unoriginal when I name my variables Let's do 200. Let's do 300. Let's do 3000 actually. Yeah Big numbers here. We go. Let's do um, whatever that is 76,000 and 37 Nine, let's keep it as nine and then maybe a 543 now if we pass in self dot list of numbers It'll give us nine because that's the smallest one in that array now Obviously, this doesn't have to be a list. It can just be a tuple since it's really practically the same thing and And obviously you can play around with this idea a little bit more if you want to set things up So you can have a tuple of your arguments and you don't have to send in an array You could just send in a bunch of integers and then it'll sort it out through that But it's whatever you want to do. I'm just giving this I'm giving this to you guys as an idea This is always something you can work with this is definitely something you could figure out on your own But uh, hey, I hope you enjoyed it and I will see you again in the next tutorial