1
00:00:00,420 --> 00:00:05,939
Let me show you how I'm going to solve this particular challenge with a few lines of code.

2
00:00:06,420 --> 00:00:13,380
So it says that the function should take two numbers and then give me the random number between the

3
00:00:13,380 --> 00:00:13,860
two.

4
00:00:14,490 --> 00:00:14,850
Right?

5
00:00:14,850 --> 00:00:15,950
So let's get going.

6
00:00:15,960 --> 00:00:18,330
So my solution is here.

7
00:00:19,390 --> 00:00:20,420
As that.

8
00:00:20,420 --> 00:00:25,790
So first of all, use the function and then, let's say get random.

9
00:00:26,750 --> 00:00:34,310
Number and the function would take my minimum number and then my maximum number, remember, and that

10
00:00:34,310 --> 00:00:38,060
they get random numbers between two numbers.

11
00:00:38,900 --> 00:00:40,010
Then here we go.

12
00:00:40,010 --> 00:00:46,820
So here I would just return from this function quickly and then let's use the built in method.

13
00:00:47,060 --> 00:00:50,510
Function map dot random.

14
00:00:51,080 --> 00:00:52,940
And then as that.

15
00:00:52,940 --> 00:01:01,940
And then I'm going to multiply it by my maximum minus minimum and then plus one.

16
00:01:02,180 --> 00:01:10,940
And then I'm going to also add my minimum because for this one I want I want to add the minimum and

17
00:01:10,940 --> 00:01:13,250
the mean and the maximum to be inclusive.

18
00:01:13,430 --> 00:01:15,470
Well, that's how I want it.

19
00:01:15,500 --> 00:01:15,910
Okay.

20
00:01:15,920 --> 00:01:17,090
That's how I want it.

21
00:01:17,360 --> 00:01:23,190
So let me consider that log the round and then it's equal to get random number.

22
00:01:23,780 --> 00:01:28,600
I want to get random numbers between, let's say, 30 and 40 like that.

23
00:01:28,640 --> 00:01:35,670
So if I cancel the log, my random round, I see.

24
00:01:35,810 --> 00:01:39,020
If I save it, I get random numbers on the fly.

25
00:01:39,320 --> 00:01:42,170
Random numbers on the fly.

26
00:01:42,980 --> 00:01:50,180
So it says that we should what, return the nearest whole number so I can floor this one.

27
00:01:50,270 --> 00:01:55,190
I can fly it to here map, dot floor.

28
00:01:55,220 --> 00:01:56,930
Then I say method.

29
00:01:56,930 --> 00:02:03,710
Then I will catch this one and then put it inside my final result as we did before.

30
00:02:03,740 --> 00:02:09,320
So with this one I'm going to get floor as that would get it.

