from numpy import array square sqrt array ([ , , ]def stat( ) len( #the length of meanx sum( )/ stdx sqrt(sumsquare ( meanx ))/nreturn [meanx ,stdxprint (stat( )[ basic math functions such as sqrt are unknown to the standard python interpreter and need to be imported more on this in section below as was already mentionedindentation is crucial it shows where the function begins and ends no semicolons are needed to end linesbut the first line of the function definition (here line must end with colon (: lists are not arrays (vectors of numbers)and vector operations cannot be performed on lists howeverthe numpy module is designed specifically with efficient vector/matrix operations in mind on the second code linewe define as vector (ndarrayobject functions such as squaresumand sqrt are then applied to such arrays note that we used the default python functions len and sum more on numpy in section running the program with stat(xinstead of print(stat( )in line will not show any output in the console to display the complete list of built-in functionstype (using double underscoresdir(__builtin__d modules python module is programming construct that is useful for organizing code into manageable parts to each module with name module_name is associated python file module_name py containing any number of definitionse of functionsclassesand variablesas well as executable statements modules can be imported into other programs using the syntaximport as where is shorthand name for the module semicolons can be used to put multiple commands on single line module