1 00:00:02,340 --> 00:00:10,380 In this example we have defined three functions and then we have a function call for each of these functions 2 00:00:10,680 --> 00:00:18,420 at the bottom of the function definition and then by passing the arguments we can execute each of these 3 00:00:18,690 --> 00:00:19,920 functions. 4 00:00:19,920 --> 00:00:30,150 But many programming languages like C++ and Java required a main function in order to execute the functions 5 00:00:30,240 --> 00:00:31,110 in your program. 6 00:00:31,560 --> 00:00:40,650 So including a main function is not required in Python but it can structured python programs in a logical 7 00:00:40,650 --> 00:00:47,190 way that puts most of the important components of the program into one function. 8 00:00:47,190 --> 00:00:49,170 That is the main function. 9 00:00:49,170 --> 00:00:54,710 And it also makes up programs easier for non Python programmers to read. 10 00:00:55,320 --> 00:01:04,230 So instead of placing the function calls at the bottom of each function we are going to define the main 11 00:01:04,230 --> 00:01:11,810 function and then place all the function calls to different functions defined in your program here. 12 00:01:11,820 --> 00:01:20,640 Now I have included the main function in the python program and function calls to different functions 13 00:01:20,730 --> 00:01:28,710 in our python program are now included in the main function so including a main function in our programs 14 00:01:28,740 --> 00:01:33,240 can be handy to structure our code in a logical way. 15 00:01:33,930 --> 00:01:39,210 So most of the important components are contained within this main function.