1 00:00:00,000 --> 00:00:04,970 In Python, arguments can be mainly of two kinds. 2 00:00:04,971 --> 00:00:06,970 We have non keyword arguments 3 00:00:06,971 --> 00:00:09,330 and we have keyword arguments. 4 00:00:09,331 --> 00:00:13,274 These two here are non keyword arguments. 5 00:00:13,275 --> 00:00:16,036 They don't have the keyword attached to them. 6 00:00:16,037 --> 00:00:18,933 However, if the case was this, 7 00:00:18,934 --> 00:00:21,800 [Author typing] 8 00:00:21,801 --> 00:00:23,236 things would still work 9 00:00:23,237 --> 00:00:28,028 the same it, but these two now would be called 10 00:00:28,029 --> 00:00:32,876 keyword arguments. Non keyword arguments, which is this one 11 00:00:32,877 --> 00:00:36,834 too are also referred to as positional arguments. 12 00:00:36,835 --> 00:00:39,648 They are called positional arguments because the 13 00:00:39,649 --> 00:00:42,992 way you communicate these two arguments to 14 00:00:42,993 --> 00:00:46,670 the function definition is based on position. 15 00:00:46,671 --> 00:00:50,432 So the first position 4 goes for A 16 00:00:50,433 --> 00:00:53,460 and the second 5 goes for B. 17 00:00:53,461 --> 00:00:55,338 So positional and non keyword 18 00:00:55,339 --> 00:00:57,444 arguments is the same thing. 19 00:00:57,445 --> 00:00:59,950 If it was keyword arguments, 20 00:00:59,951 --> 00:01:03,900 [Author typing] 21 00:01:03,910 --> 00:01:06,260 the position actually doesn't matter. 22 00:01:06,790 --> 00:01:11,368 So you can pass the value of b as the first argument if you 23 00:01:11,369 --> 00:01:16,332 like, and 4 will go to b and 5 will go to a. 24 00:01:16,333 --> 00:01:18,588 So as long as you pass them like 25 00:01:18,589 --> 00:01:21,532 that, keyword arguments, the position doesn't matter. 26 00:01:21,533 --> 00:01:24,226 You still would get the same output. 27 00:01:24,227 --> 00:01:26,514 Now, we also have default 28 00:01:26,515 --> 00:01:29,638 parameters, not arguments parameters. 29 00:01:29,639 --> 00:01:32,496 What that means is that a parameter might 30 00:01:32,497 --> 00:01:37,584 have a default value like that, which means 31 00:01:37,585 --> 00:01:42,116 you don't have to specify the value of 32 00:01:42,117 --> 00:01:44,560 that argument when you call the function. 33 00:01:44,561 --> 00:01:46,466 [Author typing] 34 00:01:46,466 --> 00:01:50,612 So we assigned 5 to a and b 35 00:01:50,613 --> 00:01:53,208 is 6 by default, therefore we get 30. 36 00:01:53,209 --> 00:01:56,926 a doesn't necessarily have to be a keyword argument, 37 00:01:56,927 --> 00:01:58,942 it can also be a non keyword argument. 38 00:01:58,943 --> 00:02:01,608 Here in the function call you 39 00:02:01,609 --> 00:02:03,570 still get the same output. 40 00:02:04,950 --> 00:02:11,318 Of course you can also assign a different value to B 41 00:02:11,319 --> 00:02:15,333 [Author typing] 42 00:02:15,334 --> 00:02:16,440 just like that. 43 00:02:17,870 --> 00:02:22,224 And lastly, you can also leave it like that, 44 00:02:22,225 --> 00:02:24,928 2 non keyword arguments and you 45 00:02:24,929 --> 00:02:27,790 still get the output correctly. 46 00:02:27,791 --> 00:02:31,162 Something you should know is that a default 47 00:02:31,163 --> 00:02:37,514 parameter cannot be before non default parameters. 48 00:02:37,515 --> 00:02:40,634 If you execute that, you'll get an error. 49 00:02:40,635 --> 00:02:44,474 It says non-default argument follows default argument. 50 00:02:44,475 --> 00:02:50,000 So non default follows default argument which is a. 51 00:02:51,410 --> 00:02:53,316 And that I think is some very 52 00:02:53,317 --> 00:02:56,710 good information about function arguments and parameters. 53 00:02:56,711 --> 00:03:00,433 [Outro sound]