in many cases we will use feature of program execution in idlethat after program execution is completedthe idle shell still remembers functions defined in the program this is not true if you run program by selecting it directly in the operating system look at the example program birthday py see it just adds two more linesnot indented can you guess what it doestry it '''function definition and invocation '' def happybirthdayemily()print("happy birthday to you!"print("happy birthday to you!"print("happy birthdaydear emily "print("happy birthday to you!" happybirthdayemily(happybirthdayemily(the execution sequence is different from the textual sequence lines - python starts from the topreading and remembering the definition the definition ends where the indentation ends (the code also shows blank line therebut that is only for humansto emphasize the end of the definition line this is not indented inside any definitionso the interpreter executes it directlycalling happybirthdayemily(while remembering where to return lines - the code of the function is executed for the first timeprinting out the song end of line back from the function call continue on line the function is called again while this location is remembered lines - the function is executed againprinting out the song again end of line back from the function callbut at this point there is nothing more in the programand execution stops functions alter execution order in several waysby statements not being executed as the definition is first readand then when the function is called during executionjumping to the function codeand back at the the end of the function execution if it also happens to be andre' birthdaywe might define function happybirthdayandretoo think how to do that before going on multiple function definitions here is example program birthday py where we add function happybirthdayandreand call them both guess what happensand then try it'''function definitions and invocation ''def happybirthdayemily()print("happy birthday to you!"print("happy birthday to you!"print("happy birthdaydear emily "print("happy birthday to you!"def happybirthdayandre()print("happy birthday to you!" beginning with python