functions inside the functionthe arguments are assigned to variables called parameters here is an example of user-defined function that takes an argumentdef print_twice(bruce)print(bruceprint(brucethis function assigns the argument to parameter named bruce when the function is calledit prints the value of the parameter (whatever it istwice this function works with any value that can be printed print_twice('spam'spam spam print_twice( import math print_twice(math pi the same rules of composition that apply to built-in functions also apply to user-defined functionsso we can use any kind of expression as an argument for print_twiceprint_twice('spam '* spam spam spam spam spam spam spam spam print_twice(math cos(math pi)- - the argument is evaluated before the function is calledso in the examples the expressions 'spam '* and math cos(math piare only evaluated once you can also use variable as an argumentmichael 'ericthe half bee print_twice(michaelericthe half bee ericthe half bee the name of the variable we pass as an argument (michaelhas nothing to do with the name of the parameter (bruceit doesn' matter what the value was called back home (in the caller)here in print_twicewe call everybody bruce