00:01
Hello, welcome to this lesson.
00:02
In this lesson, we write a program that displays all possible combination of picking two numbers, two integers from one to seven.
00:11
All right, then we'll show the total combination.
00:16
So we use the four loop.
00:20
This one will declare account.
00:25
That is a cost zero for the moment.
00:28
That will count the total combinations that we have.
00:32
And now we have a four loop.
00:36
So i in the range.
00:41
So the range from 1 to 7, but in python we don't count the last one to 8.
00:54
Then we have another fall loop that is a 4 loop.
00:59
That is also in the range 1 to 7.
01:06
But you have to add, you have to make it 8 so that we'll not count the last one.
01:13
Okay, so here what we do is that the four loop actually picks one.
01:20
So, for example, if i is starting from 1, it will pick all combinations from 1 to 7.
01:27
Then it will come again to 2.
01:29
We'll pick all combinations from 1 to 8 and in that other.
01:33
Okay, so what we do is that will print the combination.
01:40
All right.
01:46
So want to print the pair, okay, using the format, so string the formats, using string templates.
02:05
So the first place will be the first braces will be carried by the i and the other j.
02:16
And now we'll count.
02:21
So each time, each time we print out a combination.
02:31
Of the two integers, we would add one to the count.
02:35
All right...