——-> 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
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed