# -StartPython.py *- coding: utf-8 -*-
"""
Spyder Editor

#%% starts a new cell. Use second green triangle to run just the cell that
your mouse has last clicked in (or Ctrl-Enter on a PC or Command-Return on a
Macintosh or Menu>Run>Run Cell)
"""
#%%
def hello():
    print("Hello, world!")

#%%
def myname():
    print("My name is Bill")
    
#%%
def ourschool():
    print("Coursera is our school")

#%%  
  
""" This will run forever. In this case Ctrl-C will stop it, but sometimes
that doesn't work. In that case, click away IP Console to stop; click yes to 
kill kernel. Open a new IPConsole on the Console menu to restart """
#%%
def forever():
    while True:
        pass
  
#%%
lis = ["a","b" ,"c" ,"d","e" ,"f"]
#%%
lis = [1,2,3,4,1,2,3.4,5,6]
 
tlen = len(lis)

def average():
    sum = 0.0
    for elem in lis:
         sum += elem

    print("average is" , sum/tlen, "total elems:" ,tlen)
#%%
    