So we want to talk about the logic of our application.
We want to see how we can guess the number that is between one and 10 and it is in the mind of our user.
We want to guess that's number as the name of our app says, guess my number app.
OK, so till now we understand that we have a problem and we want to know how we can solve it.
OK, in programming, the world of programming, we have a thing or a concept which is called algorithmic.
Maybe you heard it before or maybe not.
But if you don't know what our algorithms, they are a concept that give you a solution for solving
problems, just like the problem that we have here.
And they are algorithms that they solve.
Problems are big, big problems.
And they may, for example, take a long time to be solved.
For example, maybe, you know, about cryptocurrency, for example, Bitcoin, these bitcoin thing
has an algorithm that is that is working and trying to solve a problem.
And by solving that problem at a bitcoin, for example, could be generated.
So this algorithm helps us to solve our problems.
We have a lot of algorithms in the world.
And if you are, for example, a software engineer and or, for example, learn computer science at
university, you know what I'm talking about?
Algorithms are giving us solutions.
And, for example, for solving one problem, for example, sorting a list.
We could have several algorithms, but they are different.
For example, one algorithm can sort a list sooner than the other, and the algorithm has its own word.
And this is really a big word.
And maybe you'd like to learn about it.
You can search in the Internet and there are a lot of courses in it.
For example, you, themI or other online courses that you can found and that you can find and learn
about them.
This is a really interesting concept and you can learn about it and how they work.
And we want to use a short algorithm or we want to use an algorithm to solve our problem.
And this problem will be solved by algorithm.
I can't name to solve it because I don't know if there is an algorithm like what we want to use in the
world, but you will see lots algorithm.
We can put this problem into details.
We can make our problem in different pieces, put it in different pieces and solve those little pieces.
And at last, when all those little pieces it has been solved, our problem will be solved like that.
So let's see here.
Let's say I have in mind number two and I want to see how I can guess this number with my application.
OK, I am going to say between vom and ten, we have ten number and I am going to divide ten by two
and that will be five.
OK, so we are going to start with five and then say, OK, is our number bigger than five or it is
less than five.
OK, and in mind I have to ok, it is less than five and then I'm going to say so it is less than five.
Five divided by two.
It will be two point five.
I'm going to round it and get the upper bound.
That will be three.
So like this I say three.
So you can see that I use an algorithm that is dividing the ten a number by two according to the input
of the user, if it is less then or bigger than the number that we have just divided by two.
OK, now I have two in mind.
Is it bigger or less than three?
Toys less than three, I'm going to input less.
OK, now I will say, is it a bigger or less than three?
And I will say it is two.
So we have guessed that and we have understand and we guess the number that the user has it in its mind.
Maybe at first you think that it's a little bit difficult to guess a number between the volume and 10
that the user has chosen.
But you can see that by using algorithms, we can divide our problem into little problems like, for
example, divided into two 1/2 between one and five and then five and 10.
The user said it is between one and five.
So now I'm going to say is the number between one and three or three and five.
Then the user said that it is between one and three, then three.
Divided by two will be one point five.
I get the upper bound and that will be two.
And I ask the user, is it between one and two or two or three?
And the user said, it is a two and we guess the number that the user has been chosen.
So I have divided my problem into little pieces, into little problems, and I am going to solve those
little problems.
And at last I will solve the whole problem like this.
Now, let's, for example, say that I want to have eight in mind.
Let's see if the user can get it or not.
First, the algorithm or the application say says that.
Is it less than a five or is it bigger than five?
OK, eight is bigger than five.
And I will say eight, I will say.
Between five and eight, between five and 10, I have seven point five and the upper bound will be eight.
So I will say is it eight?
Is it bigger than eight or less than eight?
But it is eight.
So I found a number that the user has been thinking of.
So I understand how algorithms can helps us to solve our problems.
But this is a very short piece of problem in the world of big problems that we have in the world, like
Bitcoin.
That is a steal.
The algorithm is running and it is still solving the problem.
And by solving that problem, the bitcoin is generated.
And that is why a lot of people in the world want and want to create Bitcoin and they use a lot of computers,
big computers with a lot of CPU's and cause to solve that algorithm, because that is a really, really
big algorithm.
But as we all know, Bitcoin will have its and then the algorithm is done.
So I just wanted to know that we have a shot at it and a short algorithms or short problems like this.
And we have a big problems like Bitcoin that is still a mining mining and is still solving.
So that's the logic that we want to use in our application.
Let's go ahead and jump into Android studio and see how we can implement it in Cote.