print("happy birthday to you!"print("happy birthday to you!"print("happy birthdaydear emily "print("happy birthday to you!"you would probably not repeat the whole song to let others know what to sing you would give request to sing via descriptive name like "happy birthday to emilyin python we can also give name like happybirthdayemilyand associate the name with whole song by using function definition we use the python def keywordshort for define read for now def happybirthdayemily()#program does nothing as written print("happy birthday to you!"print("happy birthday to you!"print("happy birthdaydear emily "print("happy birthday to you!"there are several parts of the syntax for function definition to noticeline the heading contains defthe name of the functionparenthesesand finally colon more general syntax is def function_name()lines - the remaining lines form the function body and are indented by consistent amount (the exact amount is not important to the interpreterthough or spaces are common conventions the whole definition does just thatdefines the meaning of the name happybirthdayemilybut it does not do anything else yet for examplethe definition itself does not make anything be printed yet this is our first example of altering the order of execution of statements from the normal sequential order notethe statements in the function definition are not executed as python first passes over the lines the code above is in example file birthday py load it in idle and execute it from there nothing should happen visibly this is just like defining variablepython just remembers the function definition for future reference after idle finished executing programhoweverits version of the shell remembers function definitions from the program in the idle shell (not the editor)enter happybirthdayemily the result probably surprises youwhen you give the shell an identifierit tells you its value abovewithout parenthesesit identifies the function code as the value (and gives location in memory of the codenow try the name in the idle shell with parentheses addedhappybirthdayemily(the parentheses tell python to execute the named function rather than just refer to the function python goes back and looks up the definitionand only thenexecutes the code inside the function definition the term for this action is function call or function invocation notein the function call there is no defbut there is the function name followed by parentheses function_name( defining functions of your own