Python Exercise 3

——-> file name hello.py def foo(): print “Hello Amar Sharma” if __name__ == “__main__”: foo() Exercise: Take the following list, nlis, and compute its average. That is, write a function ‘average(numlis)’ that uses a ‘for’ loop to sum up the numbers in numlis and divide by the length of numlis. Just to be sure that … Continue reading Python Exercise 3