# L-14 MCS 260 Fri 12 Feb 2010 : global variables # # illustration of a global variable # v = 2007 def update (formalv): "shows value of formal v\ and prompts for new v" print 'v = ', formalv new_v = input('Give new value : ') return new_v while True: v = update(v) # do not forget () ans = raw_input('continue ? (y/n) ') if ans != 'y': break