custom functions and deduced python

# Reason why these two write together, not because maybe there is anything to do, because all too simple, nothing to say

# Since the format defined functions, beginning def, after the space, after the function name, then in parentheses, brackets are the reference parameters

 

The result is 1 \ n2 \ n3 \ n4 \ n5 \ n6 \ n7 \ n8 \ n9 \ n10 \ n

Note, here is a recursive, recursion is best not to appear in the code, the recursive because every time takes up memory will accumulate increments, so if possible, try to put into a recursive loop such as this example, this can be changed to the following

 

that's it

Look at derivation of said lower for the other forgot, think of it together later

 

Guess you like

Origin blog.csdn.net/sinat_38682860/article/details/93776299