Part 2
Invent your own function that does some useful computation of your choosing. Do not copy the function from somewhere else. Use incremental development, and record each stage of the development process as you go. Finally, print output that demonstrates that the function works as you intended.
Include all of the following in your Learning Journal:
#function to print out average of list
def average(x):
mn = sum(x)/len(x)
return mn
average([2,3,4,5,6])
Comments
Leave a comment