using function whose parameters refer to the parts that are different in different situations then the code is written to be simultaneously appropriate for the separate specific situationswith the substitutions of the right parameter values you can go back to having main function againand everything works run birthday py'''function with parameter called in main''def happybirthday(person)print("happy birthday to you!"print("happy birthday to you!"print("happy birthdaydear person "print("happy birthday to you!"def main()happybirthday('emily'happybirthday('andre'main(in birthday pythe function calls in lines and were outside any function definitionso they did actually lead to immediate execution of the function in birthday py the calls to happybirthday are inside another function definition (main)so they are not actually run until the function main is run (from the last lineoutside any functionsee birthday function exercise (page we can combine function parameters with user inputand have the program be able to print happy birthday for anyone check out the main method and run birthday_who py '''user input supplies function parameter'' def happybirthday(person)print("happy birthday to you!"print("happy birthday to you!"print("happy birthdaydear person "print("happy birthday to you!" def main()username input("enter the birthday person' name"happybirthday(username main(this last version illustrates several important ideas there are more than one way to get information into function(ahave value passed in through parameter (from line to line (bprompt the userand obtain data from the keyboard (line it is good idea to separate the internal processing of data from the external input from the user by the use of distinct functions here the user interaction is in mainand the data is manipulated in happybirthday in the first examples of actual parameterswe used literal values in general an actual parameter can be an expression the expression is evaluated before it is passed in the function call one of the simplest expressions is plain variable namewhich is evaluated by replacing it with its associated value since it is only the value of the actual parameter that is passednot any variable namethere is no need to have variable name used in an actual parameter match formal parameter name (here we have the value of username in main becoming the value of person in happybirthday beginning with python