1
00:00:00,640 --> 00:00:04,240
This is coding challenge number two and let's see how it is.

2
00:00:04,600 --> 00:00:08,740
Create a function to find the average of two numbers.

3
00:00:08,740 --> 00:00:13,510
The average of two numbers is the sum of the two numbers divided by two.

4
00:00:13,690 --> 00:00:20,710
So this line number 90 has given you what is the meaning of average, and the average of two numbers

5
00:00:20,710 --> 00:00:22,480
should be retained as a number.

6
00:00:22,480 --> 00:00:25,900
So here it tells you to do some validation here.

7
00:00:26,170 --> 00:00:26,920
Okay.

8
00:00:27,070 --> 00:00:27,760
All right.

9
00:00:27,760 --> 00:00:33,280
The two numbers should be supplied as numbers, sorry, as parameters to the function.

10
00:00:33,280 --> 00:00:36,310
And lastly, convert the results to a whole number.

11
00:00:36,430 --> 00:00:39,850
So with this kind of challenge, we have done it before.

12
00:00:39,850 --> 00:00:46,210
But in this one, we've added this special key word here, like convert the result, your whole number,

13
00:00:46,210 --> 00:00:54,160
meaning I just want you to know how to use some of the built in math object and most importantly also

14
00:00:54,160 --> 00:00:56,770
add the line number 91.

15
00:00:56,770 --> 00:00:59,230
Also, this one is optional by phone.

16
00:00:59,230 --> 00:01:04,830
To improve your challenge, we can do validation to check if it's a number.

17
00:01:04,840 --> 00:01:05,290
Okay.

18
00:01:05,379 --> 00:01:09,390
Otherwise we can retain place to write a number instead of a string.

19
00:01:09,400 --> 00:01:13,810
Okay, so in this video, let's see how I'm going to solve this particular challenge.

