1 00:00:00,630 --> 00:00:01,860 How did you find that one then? 2 00:00:02,640 --> 00:00:06,950 Well, let's have Varg, because not now, there are two ways of solving this. 3 00:00:07,110 --> 00:00:08,050 This is the first way. 4 00:00:08,130 --> 00:00:17,200 Obviously, while Jay is less than four, we're going to do something to Jay. 5 00:00:17,820 --> 00:00:18,750 We are going to print. 6 00:00:20,860 --> 00:00:29,440 Four minus Jay, because four minus zero is four, four, minus one is three, etc., then. 7 00:00:31,200 --> 00:00:33,480 We're going to add one to Jay as we go. 8 00:00:34,500 --> 00:00:36,870 Now, if we play that, we should get our magical. 9 00:00:38,320 --> 00:00:44,110 Down at the bottom here for three to one, because I've effectively reversed it by putting subtraction 10 00:00:44,110 --> 00:00:49,600 into it, the other way we could do this is Vijay is equal to four. 11 00:00:50,730 --> 00:00:55,470 And then we can say, well, Jay is greater than zero. 12 00:00:57,470 --> 00:00:59,060 We're going to print Jay. 13 00:01:00,370 --> 00:01:02,740 And we're going to subtract one from Jay. 14 00:01:05,130 --> 00:01:09,490 And again, we get exactly the same result for three to one. 15 00:01:09,750 --> 00:01:12,000 So those are the two ways of doing it. 16 00:01:13,080 --> 00:01:14,310 Which one do I prefer? 17 00:01:14,730 --> 00:01:15,390 Not sure. 18 00:01:15,840 --> 00:01:17,100 Down to preference, I think. 19 00:01:18,130 --> 00:01:20,830 My first preference is don't use the while loop. 20 00:01:21,400 --> 00:01:28,090 In fact, what I do, if I have to use it is do this is exit condition. 21 00:01:29,590 --> 00:01:30,200 Foolproof. 22 00:01:30,640 --> 00:01:37,450 I always write something like that near my while loop because I need a reminder that this is a dangerous 23 00:01:37,450 --> 00:01:38,660 game that we're playing. 24 00:01:38,920 --> 00:01:42,010 I'd advise that you do the same or just use a for loop.