1 00:00:13,820 --> 00:00:19,880 Hello and welcome to the go like programming language course in the previous session, we talked about 2 00:00:19,880 --> 00:00:25,820 create a simple function in this session, we want to talk about the other functions concept. 3 00:00:29,590 --> 00:00:31,630 Function with parameters. 4 00:00:33,550 --> 00:00:40,570 Parameters are specified within the pain of plant disease in the function definition separated by commas 5 00:00:40,930 --> 00:00:48,160 when we call the function, we supply the values in the saying they are parameter is just like a variable. 6 00:00:48,520 --> 00:00:56,620 Parameters are specified after the function name inside the plant is this you can add as many parameters 7 00:00:56,620 --> 00:00:59,050 as you want inside the function. 8 00:00:59,680 --> 00:01:01,990 Now you can see the syntax. 9 00:01:04,200 --> 00:01:09,750 Go to the school program and illustrate how to use function parameters. 10 00:01:11,890 --> 00:01:20,250 First, creating it function, the two parameters of each time that adds together, for example, 11 00:01:22,900 --> 00:01:25,630 forage at 12 00:01:28,060 --> 00:01:37,080 each type of it, is it and why type of it is it? 13 00:01:40,180 --> 00:01:51,520 Now define a variable named total debt as towards sum of two variables total time Colin equals x plus 14 00:01:51,820 --> 00:01:52,360 y. 15 00:01:53,050 --> 00:01:56,190 Now display the value of total variable. 16 00:01:57,130 --> 00:02:11,620 Refer to the title of X plus y equals person D lowercase and sets the variable total. 17 00:02:13,920 --> 00:02:16,860 Reformat the code and save the project. 18 00:02:17,850 --> 00:02:29,400 Now go to the main function and in walked and function at and set to end values as arguments inside 19 00:02:29,400 --> 00:02:29,880 it. 20 00:02:30,120 --> 00:02:33,810 For example, 20 and 30. 21 00:02:35,120 --> 00:02:39,920 Now reformat the code, save the project and execute the program. 22 00:02:43,620 --> 00:02:45,570 Now we can see the output. 23 00:02:46,170 --> 00:02:53,100 We could define the function named at that axis to enter value as parameters and sum them together and 24 00:02:53,100 --> 00:02:54,480 display the result of it. 25 00:02:55,380 --> 00:03:02,430 Important note if definitions with names that is sought in an uppercase letter will be exported to other 26 00:03:02,430 --> 00:03:03,120 packages. 27 00:03:03,630 --> 00:03:10,050 If the function name starts with the lowercase letter, it won't be exported to other packages, but 28 00:03:10,050 --> 00:03:16,170 you can call this function within the same package in order not to prolong the time of decision. 29 00:03:16,380 --> 00:03:20,100 We will finish finished and we will continue the content in the next session. 30 00:03:20,400 --> 00:03:20,940 Goodbye.