1
00:00:01,000 --> 00:00:01,800
Well it's great.

2
00:00:01,790 --> 00:00:09,730
File edition dot s h when we can break these functions on the first line start shoving

3
00:00:13,820 --> 00:00:20,420
and we are going to do with all due the addition of two numbers.

4
00:00:26,500 --> 00:00:30,880
So start with asking user for entering first number

5
00:00:36,300 --> 00:00:43,910
now start the aspheric into variable first then ask for a second number.

6
00:00:50,130 --> 00:00:52,650
And start the answer into variable.

7
00:00:52,710 --> 00:00:55,880
Second.

8
00:00:56,310 --> 00:01:01,150
Now we can call the function which will do addition of two enters numbers.

9
00:01:01,440 --> 00:01:07,260
So my function will be called addition and it takes two arguments value or variable first and the value

10
00:01:07,260 --> 00:01:07,980
of variable.

11
00:01:07,980 --> 00:01:11,160
Second this function does not exist yet.

12
00:01:11,160 --> 00:01:17,010
We need to create it but do remember under Tillery lecture we need to write declaration of a function

13
00:01:17,010 --> 00:01:19,480
before the actual calling of that function.

14
00:01:19,560 --> 00:01:29,870
So function addition and inside Gardley brackets I will write code Firstly let's assign into local variable

15
00:01:29,870 --> 00:01:41,810
first first argument out of one and into local variable second assign second argument to why we are

16
00:01:41,810 --> 00:01:43,910
creating local variables here.

17
00:01:44,000 --> 00:01:45,460
We don't need that now.

18
00:01:45,530 --> 00:01:48,980
But sometimes you want to change the value of arguments.

19
00:01:49,240 --> 00:01:55,680
You don't want to change global variables and also we are using here are local variables as it is a

20
00:01:55,670 --> 00:01:58,360
good example as you will see later.

21
00:01:58,910 --> 00:02:03,070
Now let's do the actual audition using common blood.

22
00:02:03,680 --> 00:02:08,560
So result is equal first class second

23
00:02:13,000 --> 00:02:16,940
and we'll write the result to the screen.

24
00:02:26,730 --> 00:02:30,650
Now just as an experiment increment the local variable first

25
00:02:35,670 --> 00:02:38,180
and also increment a local variable.

26
00:02:38,190 --> 00:02:48,530
Second now descript is dominant but we can ensure uphold our values of variables first and second so

27
00:02:48,810 --> 00:02:49,550
we call

28
00:02:52,370 --> 00:02:53,980
printing variables

29
00:02:59,750 --> 00:03:11,210
and on the next line and other eco and print output of variable first and on the next line and other

30
00:03:11,230 --> 00:03:15,880
Ikuko month and we'll print the screen value of variable.

31
00:03:15,890 --> 00:03:16,460
Second

32
00:03:19,460 --> 00:03:25,600
you can save this group Nahoum ground it could better missions

33
00:03:28,290 --> 00:03:29,090
and you can get

34
00:03:31,980 --> 00:03:36,800
for number 5 second number seven.

35
00:03:37,220 --> 00:03:39,480
And the result is 12th grade.

36
00:03:39,490 --> 00:03:40,740
It isn't working.

37
00:03:41,120 --> 00:03:48,500
But he's not dead the variable first has the value 5 and the value of variable second is seven dead

38
00:03:48,500 --> 00:03:55,450
means that the values of that variables are very changed even if we do incrementation in the function

39
00:03:56,640 --> 00:04:01,320
because the increment and only local variables.

40
00:04:01,830 --> 00:04:09,040
If I tried another numbers for example I can try number 10 and 20.

41
00:04:09,570 --> 00:04:10,980
It is working also.

42
00:04:11,680 --> 00:04:17,830
Bhaduri about some other numbers as what say mine was then.

43
00:04:18,500 --> 00:04:21,520
And to it is working.

44
00:04:21,520 --> 00:04:29,440
The result is minus eight grade but in function we are using a variable called result.

45
00:04:29,770 --> 00:04:31,520
Is that a global variable.

46
00:04:31,990 --> 00:04:32,620
Yes.

47
00:04:32,650 --> 00:04:40,270
We didn't use keyword local the value of variable result is still the result of addition of two numbers

48
00:04:40,660 --> 00:04:43,520
even though the function was finished.

49
00:04:43,930 --> 00:04:48,530
So we in the script can still work with the value of variable result

50
00:04:51,820 --> 00:04:54,070
even round described now.

51
00:04:54,350 --> 00:04:57,260
And there are three and five.

52
00:04:57,490 --> 00:05:03,570
We still see output of result even we use it at the end of the script.
