Now, coming to running the program in silent mode or printing information to the user.
Now, at this point, overkill, if you look at it in this, we have completed this up in part.
Now over here, we want to know which those are the top three candidates for each subgroup.
So if the silent mode constant was set to force earlier in the program, it would bring the values in
all frequencies close to the screen over here.
And if the silent mode was set to truly code in the if statement block would be skipped in this case,
now that we have now reduced the number of subpoenas to a small enough number that we can brute force
all of them.
Next, we will learn how to use the tools DOT product, which we're using it over here, and we will
see how to use this function to generate every possible combination of brute force succumbing to finding
the possible suspects or combinations of subjects.
Now that we have the possible CEP's, we need to put them together to find the whole key.
The problem is that even though we found letters for each suppy, the most likely letter might not actually
be the right letter.
Instead, the second most likely or the total most likely letter might be the right subject.
So this means that we can't just combine the most likely letters for eats up into one.
We need to try different combinations of likely letters to find the right.
Hence we are using over here.
If you look at it, the other tools dot product function to test every possible combination of these.
So let us understand this.
I the product function, it produces every possible combination of items in the list or list, like
values such as a string or pupil.
Such a combination of items that also called Cartesian product, which is where the function gets its
name, the function returns and idato product object value, which can also be converted to a list by
passing it to list.
Now, if you want to see and just an example of this, we'll go back here and we will see import first,
say, Eitel tools and then we see Eido does not use product here.
We give simple, say AVC and we give here repeat is equal.
Before and after this we see a list of societal tools DOT product in Blackett, ABC and repeat is equal
to four months we press and don't close this bracket to.
You can see we're getting a list of all the possible combinations.
So passing ABC on an integer four for a repeat key.
One argument returns an identical product object when converted to a list and has to pull off four values
with every possible combination of A, B, C.
So this result in a list that has a total of somewhere around eighty one tuples, you can also pass
list values to the total product on some values similar to list such as range object returns from the
range method.
So for example, if we try out C seeing list in bracket item to start product here we give range eight
and C repeat is equal to five.
So in this case, we would get here all the values in the range of eight.
We'll need to import items and then.
Let's try to give this over here again, list items or product range eight and repeat is equal to five.
We have just expanded it and this is how we are getting the list of values is are too many lines.
Hence it is giving us a shot at how many lines of code executed.
So then the range object within the range, it is possible to store product along with five for repeat
particular argument.
It generates a list that has pull of five values, individuals ranging from zero to seven.
Now we just passed an agricultural product, a list of potential safety because the function creates
a combination of the same values and each of the subcu will probably have different potential letters.
Instead, because our guys are stored in tuple in all frequency, schools will access those letters
by the index values, which will range from zero to the number of letters we want to try minus one.
We know that the number of letters in each tuple is equal to the number of frequency letters because
we only store that number of potential letters in each tuple also.
So the range of indexes we will need to access is from zero to number most frequency letters.
So if we go back to our program here and we are giving it a range of NUM most frequency letters and
we also pass.
I talked to what products are likely Guyland as the second argument, creating tuples as long as the
potential kilim, for example, if we wanted to try only the first three most likely letters of each
subject, then Faruqi, that's likely five letters long the false evaluator to product to produce something
like zero zero zero zero zero and the next would be say zero zero zero zero one.
So until two comma two two two two two.
So each integer and the five value tuple represents an index of all the frequency scores succumbing
to accessing this up in all the frequency, the value in the all frequency score is a list that holds
basically your most likely letters of each subject, along with the frequency Mitsuko's.
So to see how that particular example works.
Now, once you are able to access the potential up using all frequencies code, you need to combine
them to find the potential letters.
So now we come to creating this combination with the tools DOT products that will be produced by the
identical product each represent one.
The position in the tuple corresponds to the first index, the axis in all frequency scores and the
integer into tuple represents the second index.
We axis in the all frequency schools now because this said been the most frequency letter constant for
the I got all the product on this particular line would cause the default to have a couple of individuals
from zero to three, representing four most likely letters for each subgroup of the indexes variable.